massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / internals / a-possible-prototype.js
index 7736376e9dee6488c03abb2e61443b6b53b21123..42c34bd02c0ca091551828c85d3c734071de8c05 100644 (file)
@@ -1,7 +1,10 @@
-var isObject = require('../internals/is-object');
+var global = require('../internals/global');
+var isCallable = require('../internals/is-callable');
 
-module.exports = function (it) {
-  if (!isObject(it) && it !== null) {
-    throw TypeError("Can't set " + String(it) + ' as a prototype');
-  } return it;
+var String = global.String;
+var TypeError = global.TypeError;
+
+module.exports = function (argument) {
+  if (typeof argument == 'object' || isCallable(argument)) return argument;
+  throw TypeError("Can't set " + String(argument) + ' as a prototype');
 };