forked from Gitlink/forgeplus-react
29 lines
854 B
JavaScript
29 lines
854 B
JavaScript
import _Object$getOwnPropertySymbols from "../../core-js/object/get-own-property-symbols";
|
|
import _Object$keys from "../../core-js/object/keys";
|
|
export default function _objectWithoutProperties(source, excluded) {
|
|
if (source == null) return {};
|
|
var target = {};
|
|
|
|
var sourceKeys = _Object$keys(source);
|
|
|
|
var key, i;
|
|
|
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
key = sourceKeys[i];
|
|
if (excluded.indexOf(key) >= 0) continue;
|
|
target[key] = source[key];
|
|
}
|
|
|
|
if (_Object$getOwnPropertySymbols) {
|
|
var sourceSymbolKeys = _Object$getOwnPropertySymbols(source);
|
|
|
|
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
key = sourceSymbolKeys[i];
|
|
if (excluded.indexOf(key) >= 0) continue;
|
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
target[key] = source[key];
|
|
}
|
|
}
|
|
|
|
return target;
|
|
} |