Get the current version of your NodeJs project
This module will return the version string for the current (running)
NodeJs application. The version string is extracted out of version
property of appʼs package.json
- lightweight, clean and simple
- zero dependencies
- no external calls to
npmor whatever - modern
ES moduleformat NodeJsv10.12.0 or higher- ease of use
npm install node-pkgverimport version from 'node-pkgver'Thatʼs all!
From now on constant version keeps the version string of your project,
i.e. current (running) NodeJs application, extracted out of version
property of appʼs package.json
Or null if version property is empty or missing from appʼs
package.json, or appʼs package.json is missing per se
If youʼve faced some bug or oversight, please follow this link to create the issue, and thank you for your time and contribution in advance!
Juliy V. Chirkov, twitter.com/juliychirkov