diff options
Diffstat (limited to 'node_modules/es5-ext/object/valid-callable.js')
-rw-r--r-- | node_modules/es5-ext/object/valid-callable.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/node_modules/es5-ext/object/valid-callable.js b/node_modules/es5-ext/object/valid-callable.js new file mode 100644 index 000000000..a97fb3eaf --- /dev/null +++ b/node_modules/es5-ext/object/valid-callable.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (fn) { + if (typeof fn !== "function") throw new TypeError(fn + " is not a function"); + return fn; +}; |