Socket
Socket
Sign inDemoInstall

is-callable

Package Overview
Dependencies
0
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.2 to 1.2.3

.eslintignore

8

CHANGELOG.md

@@ -0,1 +1,9 @@

1.2.3 / 2021-01-31
=================
* [Fix] `document.all` is callable (do not use `document.all`!)
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape`
* [Tests] migrate tests to Github Actions
* [actions] add "Allow Edits" workflow
* [actions] switch Automatic Rebase workflow to `pull_request_target` event
1.2.2 / 2020-09-21

@@ -2,0 +10,0 @@ =================

4

index.js

@@ -49,5 +49,8 @@ 'use strict';

var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
/* globals document: false */
var documentDotAll = typeof document === 'object' && typeof document.all === 'undefined' && document.all !== undefined ? document.all : {};
module.exports = reflectApply
? function isCallable(value) {
if (value === documentDotAll) { return true; }
if (!value) { return false; }

@@ -64,2 +67,3 @@ if (typeof value !== 'function' && typeof value !== 'object') { return false; }

: function isCallable(value) {
if (value === documentDotAll) { return true; }
if (!value) { return false; }

@@ -66,0 +70,0 @@ if (typeof value !== 'function' && typeof value !== 'object') { return false; }

10

package.json
{
"name": "is-callable",
"version": "1.2.2",
"version": "1.2.3",
"author": {

@@ -59,7 +59,7 @@ "name": "Jordan Harband",

"devDependencies": {
"@ljharb/eslint-config": "^17.2.0",
"aud": "^1.1.2",
"@ljharb/eslint-config": "^17.5.0",
"aud": "^1.1.3",
"covert": "^1.1.1",
"eclint": "^2.8.1",
"eslint": "^7.9.0",
"eslint": "^7.19.0",
"foreach": "^2.0.5",

@@ -73,3 +73,3 @@ "istanbul": "1.1.0-alpha.1",

"safe-publish-latest": "^1.1.4",
"tape": "^5.0.1"
"tape": "^5.1.1"
},

@@ -76,0 +76,0 @@ "testling": {

@@ -191,1 +191,9 @@ 'use strict';

});
/* globals document: false */
test('document.all', { skip: typeof document !== 'object' }, function (t) {
t.notOk(isCallable(document), 'document is not callable');
t.ok(isCallable(document.all), 'document.all is callable');
t.end();
});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc