summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/is-implemented.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/is-implemented.js')
-rw-r--r--tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/is-implemented.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/is-implemented.js b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/is-implemented.js
new file mode 100644
index 0000000000..98d0c8436a
--- /dev/null
+++ b/tools/eslint/node_modules/escope/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/is-implemented.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var create = Object.create, getPrototypeOf = Object.getPrototypeOf
+ , x = {};
+
+module.exports = function (/*customCreate*/) {
+ var setPrototypeOf = Object.setPrototypeOf
+ , customCreate = arguments[0] || create;
+ if (typeof setPrototypeOf !== 'function') return false;
+ return getPrototypeOf(setPrototypeOf(customCreate(null), x)) === x;
+};