isAbstractClosure.js 244 B

123456789
  1. 'use strict';
  2. var functionName = require('function.prototype.name');
  3. var anon = functionName(function () {});
  4. module.exports = function isAbstractClosure(x) {
  5. return typeof x === 'function' && (!x.prototype || functionName(x) === anon);
  6. };