index.js
function(obj, key, value) {
    if(typeof obj[key] === "undefined") {
        obj[key] = value;
    }
    else {
        //Check if the current option is not an array
        if(Array.isArray(obj[key]) === false) {
            obj[key] = [obj[key]];
        }
        obj[key].push(value);
    }
}
function(obj, key, value) {
    if(typeof obj[key] === "undefined") {
        obj[key] = value;
    }
    else {
        //Check if the current option is not an array
        if(Array.isArray(obj[key]) === false) {
            obj[key] = [obj[key]];
        }
        obj[key].push(value);
    }
}
function ( obj , key , value ) { if ( typeof obj [ key ] === "undefined" ) { obj [ key ] = value ; } else { //Check if the current option is not an array if ( Array . isArray ( obj [ key ] ) === false ) { obj [ key ] = [ obj [ key ] ] ; } obj [ key ] . push ( value ) ; } }
Save an option
Save an option