SILENT KILLERPanel

Current Path: > > lib > node_modules > npm > node_modules > is-callable >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //lib/node_modules/npm/node_modules/is-callable/

NameTypeSizeLast ModifiedActions
.editorconfig File 286 bytes March 10 2021 14:36:36.
.istanbul.yml File 993 bytes March 10 2021 14:36:36.
.jscs.json File 4128 bytes March 10 2021 14:36:36.
.travis.yml File 6738 bytes March 10 2021 14:36:36.
CHANGELOG.md File 2008 bytes March 10 2021 14:36:36.
LICENSE File 1082 bytes March 10 2021 14:36:36.
Makefile File 3834 bytes March 10 2021 14:36:36.
README.md File 1978 bytes March 10 2021 14:36:36.
index.js File 1113 bytes March 10 2021 14:36:36.
package.json File 2923 bytes March 10 2021 14:36:36.
test.js File 5541 bytes March 10 2021 14:36:36.

Reading File: //lib/node_modules/npm/node_modules/is-callable//index.js

'use strict';

var fnToStr = Function.prototype.toString;

var constructorRegex = /^\s*class\b/;
var isES6ClassFn = function isES6ClassFunction(value) {
	try {
		var fnStr = fnToStr.call(value);
		return constructorRegex.test(fnStr);
	} catch (e) {
		return false; // not a function
	}
};

var tryFunctionObject = function tryFunctionToStr(value) {
	try {
		if (isES6ClassFn(value)) { return false; }
		fnToStr.call(value);
		return true;
	} catch (e) {
		return false;
	}
};
var toStr = Object.prototype.toString;
var fnClass = '[object Function]';
var genClass = '[object GeneratorFunction]';
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';

module.exports = function isCallable(value) {
	if (!value) { return false; }
	if (typeof value !== 'function' && typeof value !== 'object') { return false; }
	if (typeof value === 'function' && !value.prototype) { return true; }
	if (hasToStringTag) { return tryFunctionObject(value); }
	if (isES6ClassFn(value)) { return false; }
	var strClass = toStr.call(value);
	return strClass === fnClass || strClass === genClass;
};

SILENT KILLER Tool