项目作者: ecrmnn

项目描述 :
Test if version-ish string is compatible with current Node version
高级语言: TypeScript
项目地址: git://github.com/ecrmnn/compatible-version.git
创建时间: 2019-07-11T07:25:50Z
项目社区:https://github.com/ecrmnn/compatible-version

开源协议:MIT License

下载


compatible-version

Test if version-ish string is compatible with current Node version

Travis
npm version
npm downloads
npm license
eslint

Installation

  1. npm install compatible-version --save

Usage

  1. const compatible = require('compatible-version');
  2. // Given Node.js 8.10.0
  3. compatible('v8.10.0');
  4. //=> true
  5. // Given Node.js 8.10.0
  6. compatible('8.10');
  7. //=> true
  8. // Given Node.js 8.10.0
  9. compatible('v8');
  10. //=> true
  11. // Given Node.js 8.10.0
  12. compatible('v8.10.2');
  13. //=> false
  14. // Given Node.js 8.10.0
  15. compatible('8.8');
  16. //=> false
  17. // Given Node.js 8.10.0
  18. compatible('v10');
  19. //=> false

License

MIT © Daniel Eckermann