initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
36
github/codeql-action-v2/node_modules/is-weakset/index.js
generated
vendored
Normal file
36
github/codeql-action-v2/node_modules/is-weakset/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $WeakSet = GetIntrinsic('%WeakSet%', true);
|
||||
|
||||
var $setHas = callBound('WeakSet.prototype.has', true);
|
||||
|
||||
if ($setHas) {
|
||||
var $mapHas = callBound('WeakMap.prototype.has', true);
|
||||
|
||||
module.exports = function isWeakSet(x) {
|
||||
if (!x || typeof x !== 'object') {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
$setHas(x, $setHas);
|
||||
if ($mapHas) {
|
||||
try {
|
||||
$mapHas(x, $mapHas);
|
||||
} catch (e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return x instanceof $WeakSet; // core-js workaround, pre-v3
|
||||
} catch (e) {}
|
||||
return false;
|
||||
};
|
||||
} else {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
module.exports = function isWeakSet(x) {
|
||||
// `WeakSet` does not exist, or does not have a `has` method
|
||||
return false;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue