diff options
Diffstat (limited to 'node_modules/@babel/runtime/helpers/builtin/objectWithoutProperties.js')
| -rw-r--r-- | node_modules/@babel/runtime/helpers/builtin/objectWithoutProperties.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/node_modules/@babel/runtime/helpers/builtin/objectWithoutProperties.js b/node_modules/@babel/runtime/helpers/builtin/objectWithoutProperties.js new file mode 100644 index 00000000..c7d7351e --- /dev/null +++ b/node_modules/@babel/runtime/helpers/builtin/objectWithoutProperties.js @@ -0,0 +1,27 @@ +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; +} + +module.exports = _objectWithoutProperties;
\ No newline at end of file |
