define-constant

1.0.0 • Public • Published

define-constantNPM versionspm version

define constant in nodejs or window

USAGE

1. nodejs

global.CONFIG = {};
var constant = require('define-constant')(global.CONFIG);

constant('a', 1);
constant('b', {
    a: 1,
    b: 2
});

2. window

window.CONFIG = {};
var constant = require('define-constant')(window.CONFIG);

constant('a', 1);
constant('b', {
    a: 1,
    b: 2
});

/define-constant/

    Package Sidebar

    Install

    npm i define-constant

    Weekly Downloads

    0

    Version

    1.0.0

    License

    none

    Last publish

    Collaborators

    • cloudcome