Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Feb 28, 2024 via pnpm

is-callable 1.2.7

Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag.
Package summary
Share
0
issues
1
license
1
MIT
Package created
29 Jan 2015
Version published
23 Sep 2022
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
is-callable@1.2.7
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of is-callable 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does is-callable do?

The "is-callable" is a highly useful JavaScript utility function that allows users to determine if a JavaScript value is callable. It's efficient at recognizing Function and GeneratorFunction types, contrary to the ES6 @@toStringTag. Its functionality stands out due to its extensive testing and support across various engines, ranging from different versions of Safari, Chrome, Firefox, Internet Explorer, and Opera.

How do you use is-callable?

To use "is-callable", you'll first need to install it via npm, using the command npm install is-callable. Once installed, you can use "is-callable" by requiring it in your JavaScript files and using it to test JavaScript values. Below is a sample code usage:

var isCallable = require('is-callable');
var assert = require('assert');

assert.notOk(isCallable(undefined));
assert.notOk(isCallable(null));
assert.notOk(isCallable(false));
assert.notOk(isCallable(true));
assert.notOk(isCallable([]));
assert.notOk(isCallable({}));
assert.notOk(isCallable(/a/g));
assert.notOk(isCallable(new RegExp('a', 'g')));
assert.notOk(isCallable(new Date()));
assert.notOk(isCallable(42));
assert.notOk(isCallable(NaN));
assert.notOk(isCallable(Infinity));
assert.notOk(isCallable(new Number(42)));
assert.notOk(isCallable('foo'));
assert.notOk(isCallable(Object('foo')));

assert.ok(isCallable(function () {}));
assert.ok(isCallable(function* () {}));
assert.ok(isCallable(x => x * x));

Where are the is-callable docs?

The "is-callable" npm package's documentation can be found directly on its GitHub page. It provides a comprehensive overview, including description, install instructions, supported engines, and usage examples. The readme file on GitHub is the primary source of documentation, offering all necessary information for users.