File: /home/eslinced-103/brise-edu.or.kr/node_modules/object-keys/shim.js
(function () {
"use strict";
// modified from https://github.com/kriskowal/es5-shim
var has = Object.prototype.hasOwnProperty,
is = require('is'),
forEach = require('foreach'),
hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'),
dontEnums = [
"toString",
"toLocaleString",
"valueOf",
"hasOwnProperty",
"isPrototypeOf",
"propertyIsEnumerable",
"constructor"
],
keysShim;
keysShim = function keys(object) {
if (!is.object(object) && !is.array(object)) {
throw new TypeError("Object.keys called on a non-object");
}
var name, theKeys = [];
for (name in object) {
if (has.call(object, name)) {
theKeys.push(name);
}
}
if (hasDontEnumBug) {
forEach(dontEnums, function (dontEnum) {
if (has.call(object, dontEnum)) {
theKeys.push(dontEnum);
}
});
}
return theKeys;
};
module.exports = keysShim;
}());