Navy Penguin Mariachi

    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
    });
    

    Install

    npm i define-constant

    DownloadsWeekly Downloads

    3

    Version

    1.0.0

    License

    none

    Last publish

    Collaborators

    • cloudcome