Skip to content

Commit

Permalink
some stylistic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Sep 18, 2022
1 parent 423b9b5 commit f763148
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/core-js/internals/document-all.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
var documentAll = typeof document == 'object' && document.all;

// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
var SPECIAL_DOCUMENT_ALL = typeof documentAll == 'undefined' && documentAll !== undefined;
var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;

module.exports = {
all: documentAll,
special: SPECIAL_DOCUMENT_ALL
IS_HTMLDDA: IS_HTMLDDA
};
3 changes: 1 addition & 2 deletions packages/core-js/internals/is-callable.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
var $documentAll = require('../internals/document-all');

var SPECIAL_DOCUMENT_ALL = $documentAll.special;
var documentAll = $documentAll.all;

// `IsCallable` abstract operation
// https://tc39.es/ecma262/#sec-iscallable
module.exports = SPECIAL_DOCUMENT_ALL ? function (argument) {
module.exports = $documentAll.IS_HTMLDDA ? function (argument) {
return typeof argument == 'function' || argument === documentAll;
} : function (argument) {
return typeof argument == 'function';
Expand Down
3 changes: 1 addition & 2 deletions packages/core-js/internals/is-object.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
var isCallable = require('../internals/is-callable');
var $documentAll = require('../internals/document-all');

var SPECIAL_DOCUMENT_ALL = $documentAll.special;
var documentAll = $documentAll.all;

module.exports = SPECIAL_DOCUMENT_ALL ? function (it) {
module.exports = $documentAll.IS_HTMLDDA ? function (it) {
return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll;
} : function (it) {
return typeof it == 'object' ? it !== null : isCallable(it);
Expand Down

0 comments on commit f763148

Please sign in to comment.