UNPKG

@babel/runtime-corejs2

Version:

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

13 lines 420 B
import _Object$keys from "@babel/runtime-corejs2/core-js/object/keys"; export default function _objectWithoutPropertiesLoose(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]; } return target; }