is-callable
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -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 @@ ================= |
@@ -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; } |
{ | ||
"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
21088
242