Socket
Socket
Sign inDemoInstall

default-resolution

Package Overview
Dependencies
1
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    default-resolution

Get the default resolution time based on the current node version, optionally overridable


Version published
Weekly downloads
1.1M
increased by1.02%
Maintainers
2
Install size
11.1 kB
Created
Weekly downloads
 

Readme

Source

default-resolution

NPM version Downloads Build Status Coveralls Status

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 versionresolution
0.101s
0.11+1ms

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

License

MIT

Keywords

FAQs

Last updated on 13 Dec 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc