‚̧Not a Propaganda Machine
    Wondering what‚Äôs next for npm?Check out our public roadmap! ¬Ľ

    config-extend

    0.1.1¬†‚Äʬ†Public¬†‚Äʬ†Published

    node-extend

    Object extend function designed for config files.

    Modified version of the node module node.extend, an implementation of jQuery extend.

    Differences:

    • Deep copying is enabled by default.
    • Arrays are replaced instead of combined.

    Installation

    npm install config-extend
    

    Usage

    var configExtend = require('config-extend'),
        production = {
            port: 1234,
            memcached: [
                'server1',
                'server2',
                'server3'
            ]
        },
        staging = {
            port: 456,
            memcached: [
                'server4'
            ]
        },
        devFoo = {
            memcached: [
                'localhost'
            ]
        },
        objCombined = configExtend(production, staging, devFoo);
     
        /* objCombined Value:
            {
                port: 456,
                memcached: [
                    'localhost'
                ]
            }
        */

    Keywords

    none

    Install

    npm i config-extend

    DownloadsWeekly Downloads

    10,007

    Version

    0.1.1

    License

    none

    Last publish

    Collaborators

    • avatar