Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gswalden/pkg-env
Returns an object with current NODE_ENV, package version, and several booleans about the environment
https://github.com/gswalden/pkg-env
nodejs npm-package
Last synced: 8 days ago
JSON representation
Returns an object with current NODE_ENV, package version, and several booleans about the environment
- Host: GitHub
- URL: https://github.com/gswalden/pkg-env
- Owner: gswalden
- License: isc
- Created: 2016-02-02T23:22:36.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-31T22:10:58.000Z (about 7 years ago)
- Last Synced: 2024-09-15T04:06:31.240Z (about 2 months ago)
- Topics: nodejs, npm-package
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![npm version](https://badge.fury.io/js/pkg-env.svg)](https://badge.fury.io/js/pkg-env)
[![Build status](https://travis-ci.org/gswalden/pkg-env.svg?branch=master)](https://travis-ci.org/gswalden/pkg-env)
[![Dependencies](https://david-dm.org/gswalden/pkg-env.svg)](https://david-dm.org/gswalden/pkg-env)### Install
```sh
npm install --save pkg-env
```### Use
```js
const pkgEnv = require('pkg-env');
console.log(pkgEnv);
/*
{
env: 'dev',
isDev: true,
isStaging: false,
isTest: false,
isProd: false,
version: '1.0.0'
}
*/```
### Thanks
This package is a simple consolidation of two packages, [get-env](https://www.npmjs.com/package/get-env)
and [load-pkg](https://www.npmjs.com/package/load-pkg), whose authors deserve
all the credit!