massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / internals / a-callable.js
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/core-js/internals/a-callable.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/core-js/internals/a-callable.js
new file mode 100644 (file)
index 0000000..da2f453
--- /dev/null
@@ -0,0 +1,11 @@
+var global = require('../internals/global');
+var isCallable = require('../internals/is-callable');
+var tryToString = require('../internals/try-to-string');
+
+var TypeError = global.TypeError;
+
+// `Assert: IsCallable(argument) is true`
+module.exports = function (argument) {
+  if (isCallable(argument)) return argument;
+  throw TypeError(tryToString(argument) + ' is not a function');
+};