id int64 0 1.29M | original_id stringlengths 32 32 | swhid stringlengths 100 170 | sha1 stringlengths 40 40 | repo_name stringlengths 2 45 | repo_group stringclasses 12
values | filepath stringlengths 5 153 | name stringlengths 1 14.9k | type stringclasses 3
values | code stringlengths 7 2.12M |
|---|---|---|---|---|---|---|---|---|---|
1,289,400 | 852fd10944d4cd0c3f291c3f776e36e5 | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=11-13/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::constructor | function | constructor(_mixin) {
mixin = _mixin;
} |
1,289,401 | 89e57eda09c93bfd311bf9910a325ef7 | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=402-408/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::pushPositional | function | // Push argument into positional array, applying numeric coercion:
function pushPositional(arg) {
const maybeCoercedNumber = maybeCoerceNumber('_', arg);
if (typeof maybeCoercedNumber === 'string' || typeof maybeCoercedNumber === 'number') {
argv._.push(maybeCoercedNumber... |
1,289,402 | 78bd0838dd30a7594d0cacf2af817f5b | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=409-453/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::eatNargs | function | // how many arguments should we consume, based
// on the nargs option?
function eatNargs(i, key, args, argAfterEqualSign) {
let ii;
let toEat = checkAllAliases(key, flags.nargs);
// NaN has a special meaning for the array type, indicating that one or
// mo... |
1,289,403 | 897c2004a125612be6cdef1a1df69e50 | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=586-596/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::maybeCoerceNumber | function | function maybeCoerceNumber(key, value) {
if (!configuration['parse-positional-numbers'] && key === '_')
return value;
if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) {
const shouldCoerceNumber = looksLikeNum... |
1,289,404 | 3305d62f59a43f0e561b1be74c4f038a | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=734-746/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::hasKey | function | function hasKey(obj, keys) {
let o = obj;
if (!configuration['dot-notation'])
keys = [keys.join('.')];
keys.slice(0, -1).forEach(function (key) {
o = (o[key] || {});
});
const key = keys[keys.length - 1];
if (typeof ... |
1,289,405 | abb3d2abe9c7e747250b8ff343947e1a | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=669-688/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::applyEnvVars | function | function applyEnvVars(argv, configOnly) {
if (typeof envPrefix === 'undefined')
return;
const prefix = typeof envPrefix === 'string' ? envPrefix : '';
const env = mixin.env();
Object.keys(env).forEach(function (envVar) {
if (prefix === '' |... |
1,289,406 | 53ef40139b72483a0c59cb3c38b8cd7f | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=812-849/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::extendAliases | function | // extend the aliases list with inferred aliases.
function extendAliases(...args) {
args.forEach(function (obj) {
Object.keys(obj || {}).forEach(function (key) {
// short-circuit if we've already added a key
// to the aliases array, for example... |
1,289,407 | 41f9dd3615aa2b45f05ba6b88785664b | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=850-855/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::checkAllAliases | function | function checkAllAliases(key, flag) {
const toCheck = [].concat(flags.aliases[key] || [], key);
const keys = Object.keys(flag);
const setAlias = toCheck.find(key => keys.includes(key));
return setAlias ? flag[setAlias] : false;
} |
1,289,408 | 3597b7411e0c6e349e990b296af9cdef | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=856-862/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::hasAnyFlag | function | function hasAnyFlag(key) {
const flagsKeys = Object.keys(flags);
const toCheck = [].concat(flagsKeys.map(k => flags[k]));
return toCheck.some(function (flag) {
return Array.isArray(flag) ? flag.includes(key) : flag[key];
});
} |
1,289,409 | c18ee28ec5064c4f5119f7b89e320c50 | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=932-941/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::defaultForType | function | // return a default value, given the type of a flag.,
function defaultForType(type) {
const def = {
[DefaultValuesForTypeKey.BOOLEAN]: true,
[DefaultValuesForTypeKey.STRING]: '',
[DefaultValuesForTypeKey.NUMBER]: undefined,
[DefaultValu... |
1,289,410 | 869ccc79e12bc649f98abec1216f699d | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=942-954/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::guessType | function | // given a flag, enforce a default type.
function guessType(key) {
let type = DefaultValuesForTypeKey.BOOLEAN;
if (checkAllAliases(key, flags.strings))
type = DefaultValuesForTypeKey.STRING;
else if (checkAllAliases(key, flags.numbers))
type = ... |
1,289,411 | 6b824762efc4264bcde74691ea423736 | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=454-499/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::eatArray | function | // if an option is an array, eat all non-hyphenated arguments
// following it... YUM!
// e.g., --foo apple banana cat becomes ["apple", "banana", "cat"]
function eatArray(i, key, args, argAfterEqualSign) {
let argsToSet = [];
let next = argAfterEqualSign || args[i + 1];
... |
1,289,412 | 150b40b4dc621ff6fe9844da342741c3 | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=500-548/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::setArg | function | function setArg(key, val) {
if (/-/.test(key) && configuration['camel-case-expansion']) {
const alias = key.split('.').map(function (prop) {
return camelCase(prop);
}).join('.');
addNewAlias(key, alias);
}
const valu... |
1,289,413 | 742274b65f0c6d0ce10339167149f361 | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=689-709/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::applyCoercions | function | function applyCoercions(argv) {
let coerce;
const applied = new Set();
Object.keys(argv).forEach(function (key) {
if (!applied.has(key)) { // If we haven't already coerced this option via one of its aliases
coerce = checkAllAliases(key, flags.coerc... |
1,289,414 | 22f3520265ef1fece978fad9aaf5c7a6 | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=710-719/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::setPlaceholderKeys | function | function setPlaceholderKeys(argv) {
flags.keys.forEach((key) => {
// don't set placeholder keys for dot notation options 'foo.bar'.
if (~key.indexOf('.'))
return;
if (typeof argv[key] === 'undefined')
argv[key] = undefin... |
1,289,415 | 160915039bdaa51c084c00b45dcf8401 | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=870-893/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::hasAllShortFlags | function | // based on a simplified version of the short flag group parsing logic
function hasAllShortFlags(arg) {
// if this is a negative number, or doesn't start with a single hyphen, it's not a short flag group
if (arg.match(negative) || !arg.match(/^-[^-]+/)) {
return false;
... |
1,289,416 | 906174e8898f4af94fa3ed97e6d17d5a | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=958-972/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::checkConfiguration | function | // check user configuration settings for inconsistencies
function checkConfiguration() {
// count keys should not be set as array/narg
Object.keys(flags.counts).find(key => {
if (checkAllAliases(key, flags.arrays)) {
error = Error(__('Invalid configura... |
1,289,417 | 4020efdee59aedd92df663ddf07dc09f | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=983-1024/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | combineAliases | function | // if any aliases reference each other, we should
// merge them together.
function combineAliases(aliases) {
const aliasArrays = [];
const combined = Object.create(null);
let change = true;
// turn alias lookup hash {key: ['alias1', 'alias2']} into
// a simple array ['key', 'alias1', 'alias2']
O... |
1,289,418 | c0455297527d604a1269b777d75bf7d2 | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1031-1037/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | sanitizeKey | function | // TODO(bcoe): in the next major version of yargs, switch to
// Object.create(null) for dot notation:
function sanitizeKey(key) {
if (key === '__proto__')
return '___proto___';
return key;
} |
1,289,419 | a1ac9193de1e24c6306fb8a7e99ae206 | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=14-981/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse | function | parse(argsInput, options) {
const opts = Object.assign({
alias: undefined,
array: undefined,
boolean: undefined,
config: undefined,
configObjects: undefined,
configuration: undefined,
coerce: undefined,
count: undefi... |
1,289,420 | bd6758dd3e7b790e0697396dcdccf423 | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=549-557/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::addNewAlias | function | function addNewAlias(key, alias) {
if (!(flags.aliases[key] && flags.aliases[key].length)) {
flags.aliases[key] = [alias];
newAliases[alias] = true;
}
if (!(flags.aliases[alias] && flags.aliases[alias].length)) {
addNewAlias(alias, key)... |
1,289,421 | 495710ed81e2717993ef2041c752dc07 | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=558-585/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::processValue | function | function processValue(key, val) {
// strings may be quoted, clean this up as we assign values.
if (typeof val === 'string' &&
(val[0] === "'" || val[0] === '"') &&
val[val.length - 1] === val[0]) {
val = val.substring(1, val.length - 1);
... |
1,289,422 | 432bd0175924f988661cb2b99eab018a | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=661-668/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::setConfigObjects | function | // set all config objects passed in opts
function setConfigObjects() {
if (typeof configObjects !== 'undefined') {
configObjects.forEach(function (configObject) {
setConfigObject(configObject);
});
}
} |
1,289,423 | 50cf53c096f8165fcec0e2af61de0d43 | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=863-869/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::hasFlagsMatching | function | function hasFlagsMatching(arg, ...patterns) {
const toCheck = [].concat(...patterns);
return toCheck.some(function (pattern) {
const match = arg.match(pattern);
return match && hasAnyFlag(match[1]);
});
} |
1,289,424 | 52973dbc737ec717fdeafbc593d9d0ed | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=894-896/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::isUnknownOptionAsArg | function | function isUnknownOptionAsArg(arg) {
return configuration['unknown-options-as-args'] && isUnknownOption(arg);
} |
1,289,425 | 6c6cfcaee88d2e39da7851fca7ee0e2e | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=897-919/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::isUnknownOption | function | function isUnknownOption(arg) {
arg = arg.replace(/^-{3,}/, '--');
// ignore negative numbers
if (arg.match(negative)) {
return false;
}
// if this is a short option group and all of them are configured, it isn't unknown
if (hasAllS... |
1,289,426 | 0fa55ae945a502d39cdf60f4ac1a6bc7 | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=920-931/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::defaultValue | function | // make a best effort to pick a default value
// for an option based on name and type.
function defaultValue(key) {
if (!checkAllAliases(key, flags.bools) &&
!checkAllAliases(key, flags.counts) &&
`${key}` in defaults) {
return defaults[key];
... |
1,289,427 | 243982c90fec6d6d158e25ac13e4bc0b | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=539-541/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::setArg::get | function | get() {
return val;
} |
1,289,428 | 0f50d904558585cd4654d61ca28724f9 | swh:1:cnt:828a440dd72780028cf10ccdfe1f08587ba74126;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=542-544/ | 956f1abe025171d5d3afe98518fb56020abb71c4 | wlbdashboard | wmcs | node_modules/yargs-parser/build/lib/yargs-parser.js | YargsParser::parse::setArg::set | function | set(value) {
val = typeof value === 'string' ? mixin.normalize(value) : value;
} |
1,289,429 | 65f4d13714c94521ed4693bb750341eb | swh:1:cnt:9541986b44c7169dfbc1764f06c4035881e870ac;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-54/ | 6bf7100e056c081203f8b508f3a34905b67b8812 | wlbdashboard | wmcs | node_modules/yocto-queue/index.d.ts | Queue | type | class Queue<ValueType> implements Iterable<ValueType> {
/**
The size of the queue.
*/
readonly size: number;
/**
Tiny queue data structure.
The instance is an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols), which means you can iterate over the queue front to... |
1,289,430 | e90e2a71d31a3b7b8f4430455b3ba5cd | swh:1:cnt:2f3e6dcd7299584287a2e2961e6affd2e36f9141;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-11/ | c7763d7eb09708679195bf659a5ba88a9be64421 | wlbdashboard | wmcs | node_modules/yocto-queue/index.js | Node | type | class Node {
/// value;
/// next;
constructor(value) {
this.value = value;
// TODO: Remove this when targeting Node.js 12.
this.next = undefined;
}
} |
1,289,431 | 135afe40310ea2757aa77c5dbc2dfeac | swh:1:cnt:2f3e6dcd7299584287a2e2961e6affd2e36f9141;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=13-66/ | c7763d7eb09708679195bf659a5ba88a9be64421 | wlbdashboard | wmcs | node_modules/yocto-queue/index.js | Queue | type | class Queue {
// TODO: Use private class fields when targeting Node.js 12.
// #_head;
// #_tail;
// #_size;
constructor() {
this.clear();
}
enqueue(value) {
const node = new Node(value);
if (this._head) {
this._tail.next = node;
this._tail = node;
} else {
this._head = node;
this._tail = n... |
1,289,432 | 9dc81baad869d960c22cd757a42d8648 | swh:1:cnt:2f3e6dcd7299584287a2e2961e6affd2e36f9141;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=2-10/ | c7763d7eb09708679195bf659a5ba88a9be64421 | wlbdashboard | wmcs | node_modules/yocto-queue/index.js | Node::constructor | function | /// value;
/// next;
constructor(value) {
this.value = value;
// TODO: Remove this when targeting Node.js 12.
this.next = undefined;
} |
1,289,433 | e716d20f96e9ca4f8b56db45247ce347 | swh:1:cnt:2f3e6dcd7299584287a2e2961e6affd2e36f9141;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=48-52/ | c7763d7eb09708679195bf659a5ba88a9be64421 | wlbdashboard | wmcs | node_modules/yocto-queue/index.js | Queue::clear | function | clear() {
this._head = undefined;
this._tail = undefined;
this._size = 0;
} |
1,289,434 | 24a5f0ea07d7e36cb324de21510a0e77 | swh:1:cnt:2f3e6dcd7299584287a2e2961e6affd2e36f9141;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=23-35/ | c7763d7eb09708679195bf659a5ba88a9be64421 | wlbdashboard | wmcs | node_modules/yocto-queue/index.js | Queue::enqueue | function | enqueue(value) {
const node = new Node(value);
if (this._head) {
this._tail.next = node;
this._tail = node;
} else {
this._head = node;
this._tail = node;
}
this._size++;
} |
1,289,435 | b890ce0a4cfa13e1e446a0463ab897a5 | swh:1:cnt:2f3e6dcd7299584287a2e2961e6affd2e36f9141;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=14-21/ | c7763d7eb09708679195bf659a5ba88a9be64421 | wlbdashboard | wmcs | node_modules/yocto-queue/index.js | Queue::constructor | function | // TODO: Use private class fields when targeting Node.js 12.
// #_head;
// #_tail;
// #_size;
constructor() {
this.clear();
} |
1,289,436 | 24031c4fd0ac3d59287da3face5a7db7 | swh:1:cnt:2f3e6dcd7299584287a2e2961e6affd2e36f9141;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=37-46/ | c7763d7eb09708679195bf659a5ba88a9be64421 | wlbdashboard | wmcs | node_modules/yocto-queue/index.js | Queue::dequeue | function | dequeue() {
const current = this._head;
if (!current) {
return;
}
this._head = this._head.next;
this._size--;
return current.value;
} |
1,289,437 | c26c2837992f34625906ba2cd03c92ff | swh:1:cnt:2f3e6dcd7299584287a2e2961e6affd2e36f9141;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=54-56/ | c7763d7eb09708679195bf659a5ba88a9be64421 | wlbdashboard | wmcs | node_modules/yocto-queue/index.js | Queue::size | function | get size() {
return this._size;
} |
1,289,438 | 96889c19b5046f25a8234c88a5cb03b3 | swh:1:cnt:2f3e6dcd7299584287a2e2961e6affd2e36f9141;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=58-65/ | c7763d7eb09708679195bf659a5ba88a9be64421 | wlbdashboard | wmcs | node_modules/yocto-queue/index.js | Queue::[Symbol.iterator] | function | * [Symbol.iterator]() {
let current = this._head;
while (current) {
yield current.value;
current = current.next;
}
} |
1,289,439 | 5ccb185a07f3ebe1019ef68c588a645d | swh:1:cnt:330e90e8e117fe1af9ed792d6a23a3020005d9da;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=22-52/ | 94a272efff169dea6d956376a1efa22954aefa0f | wlbdashboard | wmcs | src/context/reducer.js | reducer | function | function reducer(state, action) {
if (action.type === 'SEL_SPECIES_FILTER' || action.type === 'SEL_SUBCAT' || action.type === 'SET_PAGE') {
console.log('[Reducer]', action.type, {
speciesFilterValue: action.v?.name || action.v,
subcatValue: action.v,
pageValue: action.p
});
}
switch (... |
1,289,440 | d9e07520d654dccd5a5a681311b2dff8 | swh:1:cnt:0ed5323507aaead63ce0e276a9c3e44fd225a4bf;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=9-9/ | 151374d59aab68ac6e62fb87cfa6b6bd5c929b1b | wlbdashboard | wmcs | src/services/api.js | getCategories | function | async getCategories() { await delay(400); return TAXON_CATEGORIES; } |
1,289,441 | a38db5efcaffc44d37d4dd66c217697d | swh:1:cnt:0ed5323507aaead63ce0e276a9c3e44fd225a4bf;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=10-10/ | 151374d59aab68ac6e62fb87cfa6b6bd5c929b1b | wlbdashboard | wmcs | src/services/api.js | getTeam | function | async getTeam() { await delay(300); return DUMMY_TEAM; } |
1,289,442 | 2a8afe5e5645ade6402930938c41c6fb | swh:1:cnt:0ed5323507aaead63ce0e276a9c3e44fd225a4bf;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=12-18/ | 151374d59aab68ac6e62fb87cfa6b6bd5c929b1b | wlbdashboard | wmcs | src/services/api.js | getSightings | function | async getSightings(filters = {}) {
await delay(300);
let d = [...SIGHTINGS];
if (filters.state && filters.state !== 'All States') d = d.filter(s => s.state === filters.state);
if (filters.country && filters.country !== 'All Countries') d = d.filter(s => s.country === filters.country);
return... |
1,289,443 | 021113335a1e13d071827cdac5676943 | swh:1:cnt:0ed5323507aaead63ce0e276a9c3e44fd225a4bf;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=11-11/ | 151374d59aab68ac6e62fb87cfa6b6bd5c929b1b | wlbdashboard | wmcs | src/services/api.js | getStats | function | async getStats() { await delay(200); return STATS; } |
1,289,444 | 419dc21a4558a1d7cdc05ab9fbf67211 | swh:1:cnt:bfaaa540f4465090713c515279bc4412ce74c5c1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=76-96/ | 776dd99ef09fdcb8166e12314167c06a49959766 | wlbdashboard | wmcs | src/services/apiEndpoints.js | URLBuilder | type | class URLBuilder {
constructor(baseUrl = '') {
this.baseUrl = baseUrl;
}
buildUrl(path, params = {}) {
const query = Object.entries(params)
.filter(([, v]) => v !== undefined && v !== null && v !== '')
.map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)
.join('&');
... |
1,289,445 | 1f61ffdaff157e31389e2693a06b13c4 | swh:1:cnt:bfaaa540f4465090713c515279bc4412ce74c5c1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=77-79/ | 776dd99ef09fdcb8166e12314167c06a49959766 | wlbdashboard | wmcs | src/services/apiEndpoints.js | URLBuilder::constructor | function | constructor(baseUrl = '') {
this.baseUrl = baseUrl;
} |
1,289,446 | 77335c960ff5488fdfa57edf6ae1cc29 | swh:1:cnt:bfaaa540f4465090713c515279bc4412ce74c5c1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=102-112/ | 776dd99ef09fdcb8166e12314167c06a49959766 | wlbdashboard | wmcs | src/services/apiEndpoints.js | resolveEndpoint | function | function resolveEndpoint(url) {
for (const [key, endpoint] of Object.entries(API_ENDPOINTS)) {
if (key === 'WLB_BASE') continue;
if (typeof endpoint === 'object' && endpoint.path && url.includes(endpoint.path)) {
return { key, endpoint, type: endpoint.type };
}
}
return { key: null, endpoint: ... |
1,289,447 | 00d70783022780026cb48ca7f75cc419 | swh:1:cnt:bfaaa540f4465090713c515279bc4412ce74c5c1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=91-95/ | 776dd99ef09fdcb8166e12314167c06a49959766 | wlbdashboard | wmcs | src/services/apiEndpoints.js | URLBuilder::buildEndpointUrl | function | buildEndpointUrl(endpoint, params = {}) {
const baseUrl = endpoint.baseUrl || this.baseUrl;
const builder = new URLBuilder(baseUrl);
return builder.buildUrl(endpoint.path, params);
} |
1,289,448 | 44828909993bcea07c83928c03cf76c0 | swh:1:cnt:bfaaa540f4465090713c515279bc4412ce74c5c1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=117-128/ | 776dd99ef09fdcb8166e12314167c06a49959766 | wlbdashboard | wmcs | src/services/apiEndpoints.js | getEndpointsByType | function | function getEndpointsByType(type) {
return Object.entries(API_ENDPOINTS)
.filter(([key, endpoint]) =>
key !== 'WLB_BASE' &&
typeof endpoint === 'object' &&
endpoint.type === type
)
.reduce((acc, [key, endpoint]) => {
acc[key] = endpoint;
return acc;
}, {});
} |
1,289,449 | 3062a90d3e820a39d18bf166ba233411 | swh:1:cnt:bfaaa540f4465090713c515279bc4412ce74c5c1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=81-89/ | 776dd99ef09fdcb8166e12314167c06a49959766 | wlbdashboard | wmcs | src/services/apiEndpoints.js | URLBuilder::buildUrl | function | buildUrl(path, params = {}) {
const query = Object.entries(params)
.filter(([, v]) => v !== undefined && v !== null && v !== '')
.map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)
.join('&');
const url = `${this.baseUrl}${path}${query ? `?${query}` : ''}`;
return url;
... |
1,289,450 | d7bff16c561ab872d737bff7ea330735 | swh:1:cnt:77d25034253fe40d4c3cb57b3c54ef2975b1567b;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=33-45/ | e2952c9e5d12d3473c670965affcaac0f2e45afc | wlbdashboard | wmcs | src/services/commonService.js | routeMockAPI | function | /**
* Route mock API calls to the Api service
*/
async function routeMockAPI(url, params = {}) {
console.log(`[routeMockAPI] Routing to mock API:`, { url, params });
if (url.includes('categories')) return await Api.getCategories();
if (url.includes('team')) return await Api.getTeam();
if (url.include... |
1,289,451 | f74289258970d028f08bfb6d4b8134da | swh:1:cnt:77d25034253fe40d4c3cb57b3c54ef2975b1567b;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=47-75/ | e2952c9e5d12d3473c670965affcaac0f2e45afc | wlbdashboard | wmcs | src/services/commonService.js | routeWLBAPI | function | /**
* Route WLB API calls using the endpoint's own baseUrl
* so requests always hit the correct external host.
*/
async function routeWLBAPI(endpoint, params = {}) {
// Use the endpoint's own baseUrl (full external URL) — never the local proxy
const urlBuilder = new URLBuilder(endpoint.baseUrl);
const fullUrl ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.