JSPM

expected-node-version

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 44180
  • Score
    100M100P100Q149025F
  • License MIT

Retrieves the node version from the package.json or .nvmrc file

Package Exports

  • expected-node-version

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (expected-node-version) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

expected-node-version

API

var version = require('expected-node-version')([directory])

Load order

The module tries to load the version using the fastest mechanisms. It falls pack to loading the package.json content using require. So that content should will be cached.

  1. fetch version from package.json environment variable, which gets set by npm start
  2. fetch version from .nvmrc file
  3. fetch version from package.json value engines.node