@common.js/convert-hrtime 5.0.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +11 -2
  2. package/readme.md +0 -22
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@common.js/convert-hrtime",
3
- "version": "5.0.0",
4
- "description": "Convert the result of `process.hrtime.bigint()` to seconds, milliseconds, nanoseconds",
3
+ "version": "5.0.1",
4
+ "description": "convert-hrtime package exported as CommonJS modules",
5
5
  "license": "MIT",
6
6
  "repository": "etienne-martin/common.js",
7
7
  "funding": "https://github.com/sponsors/sindresorhus",
8
8
  "type": "commonjs",
9
+ "exports": "./index.js",
9
10
  "engines": {
10
11
  "node": ">=12"
11
12
  },
@@ -24,5 +25,13 @@
24
25
  },
25
26
  "homepage": "https://github.com/etienne-martin/common.js#readme",
26
27
  "dependencies": {},
28
+ "commonjs": {
29
+ "source": {
30
+ "name": "convert-hrtime",
31
+ "version": "5.0.0"
32
+ },
33
+ "transformRevision": 1,
34
+ "buildKey": "f20c02d9b4cc6a9685ade8e8c7817d77f5edc08b1f2ec6e522fd35eeed19f4d0"
35
+ },
27
36
  "main": "./index.js"
28
37
  }
package/readme.md DELETED
@@ -1,22 +0,0 @@
1
- # convert-hrtime
2
-
3
- > Convert the result of [`process.hrtime.bigint()`](https://nodejs.org/api/process.html#process_process_hrtime_bigint) to seconds, milliseconds, nanoseconds
4
-
5
- ## Install
6
-
7
- ```
8
- $ npm install convert-hrtime
9
- ```
10
-
11
- ## Usage
12
-
13
- ```js
14
- import convertHrtime from 'convert-hrtime';
15
-
16
- const startTime = process.hrtime.bigint();
17
- expensiveCalculation();
18
- const diff = process.hrtime.bigint() - startTime;
19
-
20
- convertHrtime(diff);
21
- //=> {seconds: 0.000002399, milliseconds: 0.002399, nanoseconds: 2399n}
22
- ```