initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
24
github/codeql-action-v2/node_modules/which-collection/index.js
generated
vendored
Normal file
24
github/codeql-action-v2/node_modules/which-collection/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
'use strict';
|
||||
|
||||
var isMap = require('is-map');
|
||||
var isSet = require('is-set');
|
||||
var isWeakMap = require('is-weakmap');
|
||||
var isWeakSet = require('is-weakset');
|
||||
|
||||
module.exports = function whichCollection(value) {
|
||||
if (value && typeof value === 'object') {
|
||||
if (isMap(value)) {
|
||||
return 'Map';
|
||||
}
|
||||
if (isSet(value)) {
|
||||
return 'Set';
|
||||
}
|
||||
if (isWeakMap(value)) {
|
||||
return 'WeakMap';
|
||||
}
|
||||
if (isWeakSet(value)) {
|
||||
return 'WeakSet';
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue