sensordb2 e64a8defe5 3.17 | há 1 ano atrás | |
---|---|---|
.. | ||
LICENSE | há 1 ano atrás | |
README.md | há 1 ano atrás | |
index.js | há 1 ano atrás | |
node-version.js | há 1 ano atrás | |
package.json | há 1 ano atrás |
Get the default resolution time based on the current node version, optionally overridable.
Originally implemented by @dinoboff in gulpjs/undertaker#17.
Split out for standalone use.
var defaultResolution = require('default-resolution');
defaultResolution();
//-> 1000 (1 second) in node 0.10
//-> 1 (millisecond) in node 0.11+
// use a different value
defaultResolution(12);
//-> 12 always
defaultResolution([resolution])
Returns the default resolution, based on the node platform. See Default resolution table below for resolutions.
Optionally takes a resolution number to force override any platform resolutions.
node version | resolution |
---|---|
0.10 | 1s |
0.11+ | 1ms |
More information at https://github.com/gulpjs/undertaker/pull/17#issuecomment-82374512
MIT