source: trip-planner-front/node_modules/npm-install-checks/README.md@ 76712b2

Last change on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 729 bytes
Line 
1# npm-install-checks
2
3Check the engines and platform fields in package.json
4
5## API
6
7Both functions will throw an error if the check fails, or return
8`undefined` if everything is ok.
9
10Errors have a `required` and `current` fields.
11
12### .checkEngine(pkg, npmVer, nodeVer, force = false)
13
14Check if node/npm version is supported by the package. If it isn't
15supported, an error is thrown.
16
17`force` argument will override the node version check, but not the npm
18version check, as this typically would indicate that the current version of
19npm is unable to install the package properly for some reason.
20
21Error code: 'EBADENGINE'
22
23### .checkPlatform(pkg, force)
24
25Check if OS/Arch is supported by the package.
26
27Error code: 'EBADPLATFORM'
Note: See TracBrowser for help on using the repository browser.