source: node_modules/at-least-node/README.md@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 919 bytes
RevLine 
[d24f17c]1# at-least-node
2
3![npm](https://img.shields.io/npm/v/at-least-node)
4![node](https://img.shields.io/node/v/at-least-node)
5![NPM](https://img.shields.io/npm/l/at-least-node)
6
7Sometimes you need to check if you're on _at least_ a given Node.js version, but you don't want to pull in the whole [`semver`](https://www.npmjs.com/package/semver) kitchen sink. That's what `at-least-node` is for.
8
9| Package | Size |
10| --------------- | ------- |
11| `at-least-node` | 2.6 kB |
12| `semver` | 75.5 kB |
13
14```js
15const atLeastNode = require('at-least-node')
16atLeastNode('10.12.0')
17// -> true on Node 10.12.0+, false on anything below that
18```
19
20When passing in a version string:
21
22- You cannot include a leading `v` (i.e. `v10.12.0`)
23- You cannot omit sections (i.e. `10.12`)
24- You cannot use pre-releases (i.e. `1.0.0-beta`)
25- There is no input validation, if you make a mistake, the resulting behavior is undefined
Note: See TracBrowser for help on using the repository browser.