summaryrefslogtreecommitdiff
path: root/node_modules/object-keys/shim.js
diff options
context:
space:
mode:
authorLinuxWizard42 <computerwizard@linuxmail.org>2022-10-12 23:08:57 +0300
committerLinuxWizard42 <computerwizard@linuxmail.org>2022-10-12 23:08:57 +0300
commit726b81b19251674e149ccfbb1abacbd837fc6db0 (patch)
treefbdbb227dc01357eb76e8222d76185bc124c5ca6 /node_modules/object-keys/shim.js
parent34f0890e175698940d49238097579f44e4d78c89 (diff)
downloadFlashRunner-726b81b19251674e149ccfbb1abacbd837fc6db0.tar.gz
FlashRunner-726b81b19251674e149ccfbb1abacbd837fc6db0.tar.zst
Removed files that should not have been included in git
Diffstat (limited to 'node_modules/object-keys/shim.js')
-rw-r--r--node_modules/object-keys/shim.js62
1 files changed, 0 insertions, 62 deletions
diff --git a/node_modules/object-keys/shim.js b/node_modules/object-keys/shim.js
deleted file mode 100644
index b88421b..0000000
--- a/node_modules/object-keys/shim.js
+++ /dev/null
@@ -1,62 +0,0 @@
-(function () {
- "use strict";
-
- // modified from https://github.com/kriskowal/es5-shim
- var has = Object.prototype.hasOwnProperty,
- toString = Object.prototype.toString,
- forEach = require('./foreach'),
- isArgs = require('./isArguments'),
- hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'),
- hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'),
- dontEnums = [
- "toString",
- "toLocaleString",
- "valueOf",
- "hasOwnProperty",
- "isPrototypeOf",
- "propertyIsEnumerable",
- "constructor"
- ],
- keysShim;
-
- keysShim = function keys(object) {
- var isObject = object !== null && typeof object === 'object',
- isFunction = toString.call(object) === '[object Function]',
- isArguments = isArgs(object),
- theKeys = [];
-
- if (!isObject && !isFunction && !isArguments) {
- throw new TypeError("Object.keys called on a non-object");
- }
-
- if (isArguments) {
- forEach(object, function (value) {
- theKeys.push(value);
- });
- } else {
- var name,
- skipProto = hasProtoEnumBug && isFunction;
-
- for (name in object) {
- if (!(skipProto && name === 'prototype') && has.call(object, name)) {
- theKeys.push(name);
- }
- }
- }
-
- if (hasDontEnumBug) {
- var ctor = object.constructor,
- skipConstructor = ctor && ctor.prototype === object;
-
- forEach(dontEnums, function (dontEnum) {
- if (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) {
- theKeys.push(dontEnum);
- }
- });
- }
- return theKeys;
- };
-
- module.exports = keysShim;
-}());
-