default-resolution
Get the default resolution time based on the current node version, optionally overridable
Last updated 5 years ago by phated .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install default-resolution 
SYNC missed versions from official npm registry.

default-resolution

NPM version Downloads Build Status AppVeyor Build Status Coveralls Status Gitter chat

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.

Usage

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

API

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.

Default resolutions

node version resolution
0.10 1s
0.11+ 1ms

More information at https://github.com/gulpjs/undertaker/pull/17#issuecomment-82374512

License

MIT

Current Tags

  • 2.0.0                                ...           latest (5 years ago)

3 Versions

  • 2.0.0                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (2)
Downloads
Today 1,831
This Week 9,559
This Month 21,571
Last Day 2,003
Last Week 10,436
Last Month 51,500
Dependencies (0)
None
Dev Dependencies (8)

Copyright 2014 - 2017 © taobao.org |