node-feature-detect
Feature detection for Node.js
Last updated 5 years ago by rstacruz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install node-feature-detect 
SYNC missed versions from official npm registry.

node-feature-detect

Checks for features.

var detect = require('node-feature-detect')

detect.features
// [ 'generators', 'let', 'fat arrow', ... ]

detect('class', 'generators')
// { unsupported: 'class', minVersion: '4.0.0' }

or:

var unsupported = detect('let')
if (unsupported) {
  // ...
}

Or you can automatically fail:

detect.fail('class', 'generators')

// Error: Your platform doesn't support these features: generators, class.
// Please upgrade to Node.js v4.0.0 or above.

Features:

  • class
  • fat arrow
  • generators
  • let
  • object.assign
  • promise
  • symbol
  • template string
  • weakmap

Thanks

node-feature-detect © 2015+, Rico Sta. Cruz. Released under the MIT License.
Authored and maintained by Rico Sta. Cruz with help from contributors (list).

ricostacruz.com  ·  GitHub @rstacruz  ·  Twitter @rstacruz

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

1 Versions

  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |