Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

a-callable.js 354B

1234567891011
  1. 'use strict';
  2. var isCallable = require('../internals/is-callable');
  3. var tryToString = require('../internals/try-to-string');
  4. var $TypeError = TypeError;
  5. // `Assert: IsCallable(argument) is true`
  6. module.exports = function (argument) {
  7. if (isCallable(argument)) return argument;
  8. throw new $TypeError(tryToString(argument) + ' is not a function');
  9. };