All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.bower_components.globalize.src.util.object.omit.js Maven / Gradle / Ivy

There is a newer version: 0.66.0.1
Show newest version
define([
    "../always-array"
], function (alwaysArray) {

    /**
     * objectOmit( object, keys )
     *
     * Return a copy of the object, filtered to omit the blacklisted key or array of keys.
     */
    return function (object, keys) {
        var key,
            copy = {};

        keys = alwaysArray(keys);

        for (key in object) {
            if (keys.indexOf(key) === -1) {
                copy[key] = object[key];
            }
        }

        return copy;
    };

});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy