mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-03 19:29:30 +08:00
9 lines
244 B
Text
9 lines
244 B
Text
'use strict';
|
|
|
|
var functionName = require('function.prototype.name');
|
|
|
|
var anon = functionName(function () {});
|
|
|
|
module.exports = function isAbstractClosure(x) {
|
|
return typeof x === 'function' && (!x.prototype || functionName(x) === anon);
|
|
};
|