npm.io
1.1.3 • Published 8 years ago

stackerjs-utils

Licence
Version
1.1.3
Deps
2
Size
12.5 MB
Vulns
0
Weekly
0
Stars
1

Travis Codecov Maintainability Dependencies npm

NPM

StackerJS

Utils

Package of utilities that works nicely in and outside StackerJS

Usage

Config

import { Config } from 'stackerjs-utils';

Config.set('any.value', { name: 'stackerjs-utils' });
Config.set('any.type', 'Hello');

Config.get('any.value'); // { "name": "stackerjs" }
Config.get('any.type'); // Hello
.ENV file

When a .env is configured in project root like this:

DB_DRIVER=mysql
APP_NAME=stackerjs-utils

It can be accessed by Config as:

import { Config } from 'stackerjs-utils';

Config.get('db.driver'); // mysql
Config.get('DB_DRIVER'); // mysql

Keywords