Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

4

index.js

@@ -372,3 +372,3 @@

/**
* is.function
* is.fn / is.function (deprecated)
* Test if `value` is a function.

@@ -381,3 +381,3 @@ *

is.function = function(value) {
is.fn = is['function'] = function(value) {
return '[object Function]' === toString.call(value);

@@ -384,0 +384,0 @@ };

@@ -14,3 +14,8 @@ {

],
"contributors": [],
"contributors": [
{
"name": "Jordan Harband",
"url": "https://github.com/ljharb"
}
],
"dependencies": {},

@@ -22,3 +27,3 @@ "repository": {

"main": "index.js",
"version": "0.2.0",
"version": "0.2.1",
"scripts": {

@@ -29,3 +34,3 @@ "test": "node test/index.js"

"tape": "~0.3.3",
"foreach": "~2.0.0"
"foreach": "~2.0.2"
},

@@ -32,0 +37,0 @@ "testling": {

@@ -63,3 +63,4 @@ # is

- function (value)
- is.fn(value)
- is.function(value) - deprecated, because in ES3 browsers, "function" is a reserved word

@@ -97,2 +98,6 @@ ### number

## Contributors
- [Jordan Harband](https://github.com/ljharb)
## License

@@ -99,0 +104,0 @@

@@ -200,11 +200,12 @@ var test = require('tape');

test('is.function', function (t) {
t.true(is.function(function () {}), 'function is function');
t.true(is.function(console.log), 'console.log is function');
test('is.fn', function (t) {
t.equal(is['function'], is.fn, 'alias works');
t.true(is.fn(function () {}), 'function is function');
t.true(is.fn(console.log), 'console.log is function');
if (typeof window !== 'undefined') {
// in IE7/8, typeof alert === 'object'
t.true(is.function(window.alert), 'window.alert is function');
t.true(is.fn(window.alert), 'window.alert is function');
}
t.false(is.function({}), 'object is not function');
t.false(is.function(null), 'null is not function');
t.false(is.fn({}), 'object is not function');
t.false(is.fn(null), 'null is not function');
t.end();

@@ -211,0 +212,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc