1.0.0 • Published 3 years ago
node-pkgver v1.0.0
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
npmor whatever - modern
ES moduleformat NodeJsv10.12.0 or higher- ease of use
Install
npm install node-pkgverUsage
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
1.0.0
3 years ago