is-function.js 403 B

1234567891011121314
  1. "use strict";
  2. var o = { call: Function.prototype.call, apply: Function.prototype.apply };
  3. module.exports = function (t, a) {
  4. a(t(function () {}), true, "Function is function");
  5. a(t(o), false, "Plain object is not function");
  6. var asyncFunction;
  7. try { asyncFunction = eval("async () => {}"); }
  8. catch (error) {}
  9. if (asyncFunction) {
  10. a(t(asyncFunction), true, "Async function is function");
  11. }
  12. };