Version 1
[yaffs-website] / node_modules / core-js / library / modules / _object-gpo.js
diff --git a/node_modules/core-js/library/modules/_object-gpo.js b/node_modules/core-js/library/modules/_object-gpo.js
new file mode 100644 (file)
index 0000000..535dc6e
--- /dev/null
@@ -0,0 +1,13 @@
+// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
+var has         = require('./_has')
+  , toObject    = require('./_to-object')
+  , IE_PROTO    = require('./_shared-key')('IE_PROTO')
+  , ObjectProto = Object.prototype;
+
+module.exports = Object.getPrototypeOf || function(O){
+  O = toObject(O);
+  if(has(O, IE_PROTO))return O[IE_PROTO];
+  if(typeof O.constructor == 'function' && O instanceof O.constructor){
+    return O.constructor.prototype;
+  } return O instanceof Object ? ObjectProto : null;
+};
\ No newline at end of file