check-node-engine
v1.1.0
Published
Compare the required node engine to the last older LTS node version.
Maintainers
Readme
check-node-engine
Compare the required node engine to the last older LTS node version.
Features
- Get the older NodeJS current LTS
- Compare this version to the current minimal engine node
Doc
Methods
(source?: string | tPackageType) => Promise<void>compare node versions
Command line options
--get-lts=> only get the older current official LTS version of NodeJS--package-file <package path>=> specify an optional package path
Examples
Command line
$ cd ./myProject/ && npx check-node-engine
$ cd ./myProject/ && npx check-node-engine --get-lts
$ cd ./myProject/ && npx check-node-engine --package-file "./package.json"Native
const checker = require("check-node-engine");
checker().then(() => {
console.log("ok");
}).catch((err) => {
console.error(err);
});
checker("./package.json").then(() => {
console.log("ok");
}).catch((err) => {
console.error(err);
});Typescript
import checker = require("check-node-engine");
checker().then(() => {
console.log("ok");
}).catch((err) => {
console.error(err);
});
checker("./package.json").then(() => {
console.log("ok");
}).catch((err) => {
console.error(err);
});Tests
$ npm run tests