https://github.com/ecrmnn/compatible-version
Test if version-ish string is compatible with current Node version
https://github.com/ecrmnn/compatible-version
nvm nvmrc version-check
Last synced: 4 months ago
JSON representation
Test if version-ish string is compatible with current Node version
- Host: GitHub
- URL: https://github.com/ecrmnn/compatible-version
- Owner: ecrmnn
- License: mit
- Created: 2019-07-11T07:25:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-11T07:44:15.000Z (over 6 years ago)
- Last Synced: 2025-08-19T23:13:51.679Z (4 months ago)
- Topics: nvm, nvmrc, version-check
- Language: TypeScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# compatible-version
> Test if version-ish string is compatible with current Node version
[](https://travis-ci.org/ecrmnn/compatible-version.svg?branch=master)
[](http://badge.fury.io/js/compatible-version)
[](http://badge.fury.io/js/compatible-version)
[](http://badge.fury.io/js/compatible-version)
[](https://github.com/airbnb/javascript)
### Installation
```bash
npm install compatible-version --save
```
### Usage
```js
const compatible = require('compatible-version');
// Given Node.js 8.10.0
compatible('v8.10.0');
//=> true
// Given Node.js 8.10.0
compatible('8.10');
//=> true
// Given Node.js 8.10.0
compatible('v8');
//=> true
// Given Node.js 8.10.0
compatible('v8.10.2');
//=> false
// Given Node.js 8.10.0
compatible('8.8');
//=> false
// Given Node.js 8.10.0
compatible('v10');
//=> false
```
### License
MIT © [Daniel Eckermann](http://danieleckermann.com)