MES手机端
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.
 
 
 
 

12 lines
354 B

  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. };