mirror of
https://github.com/S2-/gitlit
synced 2025-08-04 13:10:09 +02:00
remove node_modules
This commit is contained in:
62
app/node_modules/object-keys/shim.js
generated
vendored
62
app/node_modules/object-keys/shim.js
generated
vendored
@@ -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;
|
||||
}());
|
||||
|
Reference in New Issue
Block a user