node-pkgver
v1.0.0
Published
Get the current version of your NodeJs project
Downloads
11
Maintainers
Readme
node-pkgver
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
Whatʼs the catch of one more implementation?
- lightweight, clean and simple
- zero dependencies
- no external calls to
npm
or whatever - modern
ES module
format NodeJs
v10.12.0 or higher- ease of use
Install
npm install node-pkgver
Usage
import 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
Bugs and oversights
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!
Glory to Ukraine! 🇺🇦
Juliy V. Chirkov, twitter.com/juliychirkov