mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-02 20:00:05 +02:00
update modules
This commit is contained in:
18
node_modules/browser-process-hrtime/README.md
generated
vendored
18
node_modules/browser-process-hrtime/README.md
generated
vendored
@@ -1,23 +1,25 @@
|
||||
# browser-process-hrtime
|
||||
|
||||
Browser shim for Node.js process.hrtime().
|
||||
Browser shim for Node.js `process.hrtime()`.
|
||||
See [documentation at nodejs.org](http://nodejs.org/api/process.html#process_process_hrtime)
|
||||
|
||||
This module does not provide the same level of time precision as node.js, but provides a matching API and response format.
|
||||
|
||||
### usage
|
||||
Use hrtime independant of environment (node or browser).
|
||||
It will use process.hrtime first and fallback if not present.
|
||||
Use hrtime independent of environment (node or browser).
|
||||
It will use `process.hrtime` first and fallback if not present.
|
||||
```js
|
||||
var hrtime = require('browser-process-hrtime')
|
||||
var start = hrtime()
|
||||
const hrtime = require('browser-process-hrtime')
|
||||
const start = hrtime()
|
||||
// ...
|
||||
var delta = hrtime(start)
|
||||
const delta = hrtime(start)
|
||||
```
|
||||
|
||||
### monkey-patching
|
||||
You can monkey-patch process.hrtime for your dependency graph like this:
|
||||
You can monkey-patch `process.hrtime` for your dependency graph like this:
|
||||
```js
|
||||
process.hrtime = require('browser-process-hrtime')
|
||||
var coolTool = require('module-that-uses-hrtime-somewhere-in-its-depths')
|
||||
const coolTool = require('module-that-uses-hrtime-somewhere-in-its-depths')
|
||||
```
|
||||
|
||||
### note
|
||||
|
Reference in New Issue
Block a user