META-INF.resources.bower_components.globalize.src.util.object.omit.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jwebmp-globalize Show documentation
Show all versions of jwebmp-globalize Show documentation
The JWebSwing implementation for a full Globalization
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;
};
});