UNPKG

@babel/runtime-corejs2

Version:

babel's modular runtime helpers with core-js@2 polyfilling

17 lines 733 B
import _Object$getOwnPropertySymbols from "core-js/library/fn/object/get-own-property-symbols.js"; import objectWithoutPropertiesLoose from "./objectWithoutPropertiesLoose.js"; export default function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = objectWithoutPropertiesLoose(source, excluded); var key, i; 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; }