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,286,300
1971508030b08f93bc6309e049db7c7b
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=811-818/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
optimizeExpr::canOptimize
function
function canOptimize(e: SafeExpr): e is _Code { return ( e instanceof _Code && e._items.some( (c) => c instanceof Name && names[c.str] === 1 && constants[c.str] !== undefined ) ) }
1,286,301
e4b6ab685f9e491d22da4582c662d2ea
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=151-153/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
AnyCode::render
function
render({_n}: CGOptions): string { return `${this.code};` + _n }
1,286,302
f06ee9dc022dc2df516b2ffab0f148e8
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=155-157/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
AnyCode::optimizeNodes
function
optimizeNodes(): this | undefined { return `${this.code}` ? this : undefined }
1,286,303
6c8f5b0aabf1224e3be7b536a1fee2fb
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=282-284/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
ForLoop::constructor
function
constructor(private iteration: Code) { super() }
1,286,304
580e321a538c7df1e00673f19de898e7
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=333-335/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
ForIter::render
function
render(opts: CGOptions): string { return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts) }
1,286,305
4d56104fd508108b0761e606df33af31
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=383-388/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
Try::optimizeNodes
function
optimizeNodes(): this { super.optimizeNodes() this.catch?.optimizeNodes() as Catch | undefined this.finally?.optimizeNodes() as Finally | undefined return this }
1,286,306
2874fce733f597d77c534f382a5456a4
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=579-582/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::elseIf
function
// `else if` clause - invalid without `if` or after `else` clauses elseIf(condition: Code | boolean): CodeGen { return this._elseNode(new If(condition)) }
1,286,307
ffe028cc7b7b82f1316a5c75222948d9
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=605-615/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::forRange
function
// `for` statement for a range of values forRange( nameOrPrefix: Name | string, from: SafeExpr, to: SafeExpr, forBody: (index: Name) => void, varKind: Code = this.opts.es5 ? varKinds.var : varKinds.let ): CodeGen { const name = this._scope.toName(nameOrPrefix) return this._for(new ForRan...
1,286,308
4a4b2e22c0b107b93d98795533c08c2e
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=754-761/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::_elseNode
function
private _elseNode(node: If | Else): CodeGen { const n = this._currNode if (!(n instanceof If)) { throw new Error('CodeGen: "else" without "if"') } this._currNode = n.else = node return this }
1,286,309
05f1f22ab3d847cfd0f168cc499ff52d
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=44-50/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
Def::constructor
function
constructor( private readonly varKind: Name, private readonly name: Name, private rhs?: SafeExpr ) { super() }
1,286,310
82ba57f62bf6824c9371322df449917c
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=70-76/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
Assign::constructor
function
constructor( readonly lhs: Code, public rhs: SafeExpr, private readonly sideEffects?: boolean ) { super() }
1,286,311
86376ce835c37650cb4f87d9331b693c
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=122-124/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
Break::constructor
function
constructor(readonly label?: Code) { super() }
1,286,312
8eda40f44edb9d4351c3707663517b81
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=141-143/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
Throw::names
function
get names(): UsedNames { return this.error.names }
1,286,313
74cc8204ab744beb267b07d22b116818
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=227-232/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
If::constructor
function
constructor( private condition: Code | boolean, nodes?: ChildNode[] ) { super(nodes) }
1,286,314
ed8858229e7ea96317290a4c3280edcd
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=258-263/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
If::optimizeNames
function
optimizeNames(names: UsedNames, constants: Constants): this | undefined { this.else = this.else?.optimizeNames(names, constants) if (!(super.optimizeNames(names, constants) || this.else)) return this.condition = optimizeExpr(this.condition, names, constants) return this }
1,286,315
53c3475c34c0bde3857818f0281deea1
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=538-541/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::add
function
// `+=` code add(lhs: Code, rhs: SafeExpr): CodeGen { return this._leafNode(new AssignOp(lhs, operators.ADD, rhs)) }
1,286,316
9ec03ec55a55cab331f49958b6496d49
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=95-102/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
AssignOp::constructor
function
constructor( lhs: Code, private readonly op: Code, rhs: SafeExpr, sideEffects?: boolean ) { super(lhs, rhs, sideEffects) }
1,286,317
6c8b896520468e28758c9940e4e77a1a
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=496-500/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::scopeRefs
function
// return code that assigns values in the external scope to the names that are used internally // (same names that were returned by gen.scopeName or gen.scopeValue) scopeRefs(scopeName: Name): Code { return this._extScope.scopeRefs(scopeName, this._values) }
1,286,318
d420b3fbb99e6c4e410500e0d374360f
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=58-62/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
Def::optimizeNames
function
optimizeNames(names: UsedNames, constants: Constants): this | undefined { if (!names[this.name.str]) return if (this.rhs) this.rhs = optimizeExpr(this.rhs, names, constants) return this }
1,286,319
3ac50891cf9bce3527587e8ca909cb12
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=286-288/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
ForLoop::render
function
render(opts: CGOptions): string { return `for(${this.iteration})` + super.render(opts) }
1,286,320
e7dd3b7ea09649fad0d52f3449b7b72c
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=343-345/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
ForIter::names
function
get names(): UsedNames { return addNames(super.names, this.iterable.names) }
1,286,321
2d651c213c53717c3758027db20c2532
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=367-369/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
Return::render
function
render(opts: CGOptions): string { return "return " + super.render(opts) }
1,286,322
3223f9a36bcda660896cc7b81de16d2a
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=474-477/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::name
function
// returns unique name in the internal scope name(prefix: string): Name { return this._scope.name(prefix) }
1,286,323
59b90bc6313859cb8fc6cbf0b2acc258
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=600-603/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::for
function
// a generic `for` clause (or statement if `forBody` is passed) for(iteration: Code, forBody?: Block): CodeGen { return this._for(new ForLoop(iteration), forBody) }
1,286,324
9af3183731602d03c442a129104ab00b
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=674-690/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::try
function
// `try` statement try(tryBody: Block, catchCode?: (e: Name) => void, finallyCode?: Block): CodeGen { if (!catchCode && !finallyCode) throw new Error('CodeGen: "try" without "catch" and "finally"') const node = new Try() this._blockNode(node) this.code(tryBody) if (catchCode) { const error =...
1,286,325
a8cf9d245ac967c4411bdee3c61046f2
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=126-129/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
Break::render
function
render({_n}: CGOptions): string { const label = this.label ? ` ${this.label}` : "" return `break${label};` + _n }
1,286,326
a33b8e7b69c3882bbe03b6640766c49b
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=164-166/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
AnyCode::names
function
get names(): UsedNames { return this.code instanceof _CodeOrName ? this.code.names : {} }
1,286,327
bd10093cf30917679dca67bd9304c133
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=463-468/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::constructor
function
constructor(extScope: ValueScope, opts: CodeGenOptions = {}) { this.opts = {...opts, _n: opts.lines ? "\n" : ""} this._extScope = extScope this._scope = new Scope({parent: extScope}) this._nodes = [new Root()] }
1,286,328
28badbe8094ee973f9048ea4f14bb924
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=692-695/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::throw
function
// `throw` statement throw(error: Code): CodeGen { return this._leafNode(new Throw(error)) }
1,286,329
9ff8899a29476533f60c678e95537526
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=704-714/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::endBlock
function
// end the current self-balancing block endBlock(nodeCount?: number): CodeGen { const len = this._blockStarts.pop() if (len === undefined) throw new Error("CodeGen: not in self-balancing block") const toClose = this._nodes.length - len if (toClose < 0 || (nodeCount !== undefined && toClose !== nodeCou...
1,286,330
65dc6ada99594116c69d31ddeca7041f
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=728-733/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::optimize
function
optimize(n = 1): void { while (n-- > 0) { this._root.optimizeNodes() this._root.optimizeNames(this._root.names, this._constants) } }
1,286,331
3fd16785aab51137939f77497febb530
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=740-743/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::_blockNode
function
private _blockNode(node: StartBlockNode): void { this._currNode.nodes.push(node) this._nodes.push(node) }
1,286,332
f8bd66c4368fddff76b64bb012724d84
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=782-785/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
addNames
function
function addNames(names: UsedNames, from: UsedNames): UsedNames { for (const n in from) names[n] = (names[n] || 0) + (from[n] || 0) return names }
1,286,333
cd951eef486d95d4a87a491aabd33dea
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=745-752/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::_endBlockNode
function
private _endBlockNode(N1: EndBlockNodeType, N2?: EndBlockNodeType): CodeGen { const n = this._currNode if (n instanceof N1 || (N2 && n instanceof N2)) { this._nodes.pop() return this } throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`) }
1,286,334
192e07bab58e1d6c62670e16dcadf96a
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=470-472/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::toString
function
toString(): string { return this._root.render(this.opts) }
1,286,335
6b02ca58751127dda04194f037732c76
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=64-66/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
Def::names
function
get names(): UsedNames { return this.rhs instanceof _CodeOrName ? this.rhs.names : {} }
1,286,336
7af233b5ed96caecde021f93ef8585dd
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=358-361/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
Func::render
function
render(opts: CGOptions): string { const _async = this.async ? "async " : "" return `${_async}function ${this.name}(${this.args})` + super.render(opts) }
1,286,337
2c2c3c4514a2455ae06b103f75db0bf5
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=716-721/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::func
function
// `function` heading (or definition if funcBody is passed) func(name: Name, args: Code = nil, async?: boolean, funcBody?: Block): CodeGen { this._blockNode(new Func(name, args, async)) if (funcBody) this.code(funcBody).endFunc() return this }
1,286,338
69162878c199c0e1576ec8233c18528d
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=723-726/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::endFunc
function
// end function definition endFunc(): CodeGen { return this._endBlockNode(Func) }
1,286,339
2eaf31dfa8944054ebc8f4fc1f10c229
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=787-789/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
addExprNames
function
function addExprNames(names: UsedNames, from: SafeExpr): UsedNames { return from instanceof _CodeOrName ? addNames(names, from.names) : names }
1,286,340
613e47943fc22dfc0fbffd5bd5bd38e8
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=290-294/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
ForLoop::optimizeNames
function
optimizeNames(names: UsedNames, constants: Constants): this | undefined { if (!super.optimizeNames(names, constants)) return this.iteration = optimizeExpr(this.iteration, names, constants) return this }
1,286,341
51488405a02c55271f98fd24d07f772b
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=317-320/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
ForRange::names
function
get names(): UsedNames { const names = addExprNames(super.names, this.from) return addExprNames(names, this.to) }
1,286,342
386e9aa15ed465920df16b76e0534d14
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=543-548/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::code
function
// appends passed SafeExpr to code or executes Block code(c: Block | SafeExpr): CodeGen { if (typeof c == "function") c() else if (c !== nil) this._leafNode(new AnyCode(c)) return this }
1,286,343
49f9fe11511d25b690709875ddee9803
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=88-91/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
Assign::names
function
get names(): UsedNames { const names = this.lhs instanceof Name ? {} : {...this.lhs.names} return addExprNames(names, this.rhs) }
1,286,344
4a1fbe63618c140700c0a684e396156f
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=170-172/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
constructor
function
constructor(readonly nodes: ChildNode[] = []) { super() }
1,286,345
e0cf7f0dce4cc7d64153768527c5a65a
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=234-238/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
If::render
function
render(opts: CGOptions): string { let code = `if(${this.condition})` + super.render(opts) if (this.else) code += "else " + this.else.render(opts) return code }
1,286,346
0585f4484ea456584d9f40c46d3aa3e5
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=265-270/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
If::names
function
get names(): UsedNames { const names = super.names addExprNames(names, this.condition) if (this.else) addNames(names, this.else.names) return names }
1,286,347
22a792590f2fa04ff85dfeab64611d76
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=665-672/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
CodeGen::return
function
// `return` statement return(value: Block | SafeExpr): CodeGen { const node = new Return() this._blockNode(node) this.code(value) if (node.nodes.length !== 1) throw new Error('CodeGen: "return" should have one node') return this._endBlockNode(Return) }
1,286,348
38d33938608e142ca07745dbb935de00
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=804-809/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
optimizeExpr::replaceName
function
function replaceName(n: Name): SafeExpr { const c = constants[n.str] if (c === undefined || names[n.str] !== 1) return n delete names[n.str] return c }
1,286,349
7f566d2cfd878fe73c4ccc75fd7e1e53
swh:1:cnt:5a6d1ee58c106245ba8a1b56f929fe3a23f337b8;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=826-828/
340521a1dacadb2518fc637a668b640cef6e3685
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/index.ts
not
function
function not(x: Code | SafeExpr): Code | SafeExpr { return typeof x == "boolean" || typeof x == "number" || x === null ? !x : _`!${par(x)}` }
1,286,350
6d07ce9dfd7981aa84b11e6bf5f5dec1
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=3-6/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
NameGroup
type
interface NameGroup { prefix: string index: number }
1,286,351
e5436fa2fa3fc4cfa51cd688ec2c8bd7
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=24-27/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ScopeOptions
type
interface ScopeOptions { prefixes?: Set<string> parent?: Scope }
1,286,352
619b2a19c6fb12053a762440a12a6d03
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=16-22/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ValueError
type
class ValueError extends Error { readonly value?: NameValue constructor(name: ValueScopeName) { super(`CodeGen: "code" for ${name} not defined`) this.value = name.value } }
1,286,353
a25b4b5e821831d9860f81d7b8ce5846
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=14-14/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ValueReference
type
type ValueReference = unknown // possibly make CodeGen parameterized type on this type
1,286,354
154fa48558af1d965a4e67c8a7f05204
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=8-12/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
NameValue
type
interface NameValue { ref: ValueReference // this is the reference to any value that can be referred to from generated code via `globals` var in the closure key?: unknown // any key to identify a global to avoid duplicates, if not passed ref is used code?: Code // this is the code creating the value needed for st...
1,286,355
6d566e65fc9ca90baef1a6239fa242aa
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=29-33/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ValueScopeOptions
type
interface ValueScopeOptions extends ScopeOptions { scope: ScopeStore es5?: boolean lines?: boolean }
1,286,356
88c0b835c6e30d2bcc75f753a71499a2
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=35-35/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ScopeStore
type
type ScopeStore = Record<string, ValueReference[] | undefined>
1,286,357
4afcf6b02117eefb9a49a9074fd2531f
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=37-39/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ScopeValues
type
type ScopeValues = { [Prefix in string]?: Map<unknown, ValueScopeName> }
1,286,358
fbebee69ce1771979c2d7f11cdd080d8
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=41-43/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ScopeValueSets
type
type ScopeValueSets = { [Prefix in string]?: Set<ValueScopeName> }
1,286,359
a32534998deb709bb820495c7ffcd725
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=45-48/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
UsedValueState
type
enum UsedValueState { Started, Completed, }
1,286,360
35eed067a73e709893ce7f9fbd175906
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=91-94/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ScopePath
type
interface ScopePath { property: string itemIndex: number }
1,286,361
b298205ab5974fc5fc880a33442b85f9
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=60-89/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
Scope
type
class Scope { protected readonly _names: {[Prefix in string]?: NameGroup} = {} protected readonly _prefixes?: Set<string> protected readonly _parent?: Scope constructor({prefixes, parent}: ScopeOptions = {}) { this._prefixes = prefixes this._parent = parent } toName(nameOrPrefix: Name | string): N...
1,286,362
fb425a14c319c51e6ad8823b1f9679f4
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=118-215/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ValueScope
type
class ValueScope extends Scope { protected readonly _values: ScopeValues = {} protected readonly _scope: ScopeStore readonly opts: VSOptions constructor(opts: ValueScopeOptions) { super(opts) this._scope = opts.scope this.opts = {...opts, _n: opts.lines ? line : nil} } get(): ScopeStore { ...
1,286,363
c7ab66fb4e682f8c375123b330915495
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=96-110/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ValueScopeName
type
class ValueScopeName extends Name { readonly prefix: string value?: NameValue scopePath?: Code constructor(prefix: string, nameStr: string) { super(nameStr) this.prefix = prefix } setValue(value: NameValue, {property, itemIndex}: ScopePath): void { this.value = value this.scopePath = _`.${...
1,286,364
7da24a329c86e7f06922d74f66421f74
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=112-114/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
VSOptions
type
interface VSOptions extends ValueScopeOptions { _n: Code }
1,286,365
1584e99e5e3720a861b0faae72521628
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=50-52/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
UsedScopeValues
type
type UsedScopeValues = { [Prefix in string]?: Map<ValueScopeName, UsedValueState | undefined> }
1,286,366
f251087d05171b672470252bd4490b6c
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=18-21/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ValueError::constructor
function
constructor(name: ValueScopeName) { super(`CodeGen: "code" for ${name} not defined`) this.value = name.value }
1,286,367
ff1576280ba93692614f94d816dd72e5
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=74-76/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
Scope::name
function
name(prefix: string): Name { return new Name(this._newName(prefix)) }
1,286,368
4f94517c7a55a0e0140da1d605973eac
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=65-68/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
Scope::constructor
function
constructor({prefixes, parent}: ScopeOptions = {}) { this._prefixes = prefixes this._parent = parent }
1,286,369
b8db5c70ad2af631786017989f6cdfb0
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=70-72/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
Scope::toName
function
toName(nameOrPrefix: Name | string): Name { return nameOrPrefix instanceof Name ? nameOrPrefix : this.name(nameOrPrefix) }
1,286,370
fdfd30ed331d73de7c00f8e95e8d3642
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=78-81/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
Scope::_newName
function
protected _newName(prefix: string): string { const ng = this._names[prefix] || this._nameGroup(prefix) return `${prefix}${ng.index++}` }
1,286,371
ef4c79a7b650706f3f3b17c6af061544
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=83-88/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
Scope::_nameGroup
function
private _nameGroup(prefix: string): NameGroup { if (this._parent?._prefixes?.has(prefix) || (this._prefixes && !this._prefixes.has(prefix))) { throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`) } return (this._names[prefix] = {prefix, index: 0}) }
1,286,372
c6663777bb10f6476dfdad4caf6f547e
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=101-104/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ValueScopeName::constructor
function
constructor(prefix: string, nameStr: string) { super(nameStr) this.prefix = prefix }
1,286,373
171c1962a1e95e060e20c42cad744693
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=106-109/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ValueScopeName::setValue
function
setValue(value: NameValue, {property, itemIndex}: ScopePath): void { this.value = value this.scopePath = _`.${new Name(property)}[${itemIndex}]` }
1,286,374
c25eda9b2c2b5b233450ad6e02ed5973
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=123-127/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ValueScope::constructor
function
constructor(opts: ValueScopeOptions) { super(opts) this._scope = opts.scope this.opts = {...opts, _n: opts.lines ? line : nil} }
1,286,375
05338b88e7bc31d80828aaa50b9fe838
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=129-131/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ValueScope::get
function
get(): ScopeStore { return this._scope }
1,286,376
207498d95f26177b1b07cf50b0f312d0
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=137-156/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ValueScope::value
function
value(nameOrPrefix: ValueScopeName | string, value: NameValue): ValueScopeName { if (value.ref === undefined) throw new Error("CodeGen: ref must be passed in value") const name = this.toName(nameOrPrefix) as ValueScopeName const {prefix} = name const valueKey = value.key ?? value.ref let vs = this._...
1,286,377
fee218a7a8fc3f1377f0ccffc4146305
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=158-162/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ValueScope::getValue
function
getValue(prefix: string, keyOrRef: unknown): ValueScopeName | undefined { const vs = this._values[prefix] if (!vs) return return vs.get(keyOrRef) }
1,286,378
8cd078ce0442e048b0c0c4e7d0ec210c
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=164-169/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ValueScope::scopeRefs
function
scopeRefs(scopeName: Name, values: ScopeValues | ScopeValueSets = this._values): Code { return this._reduceValues(values, (name: ValueScopeName) => { if (name.scopePath === undefined) throw new Error(`CodeGen: name "${name}" has no value`) return _`${scopeName}${name.scopePath}` }) }
1,286,379
889b9527b2112fba919f13941646ca14
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=171-185/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ValueScope::scopeCode
function
scopeCode( values: ScopeValues | ScopeValueSets = this._values, usedValues?: UsedScopeValues, getCode?: (n: ValueScopeName) => Code | undefined ): Code { return this._reduceValues( values, (name: ValueScopeName) => { if (name.value === undefined) throw new Error(`CodeGen: name "${n...
1,286,380
0ba795c7957977ef682ba2f4f03b787d
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=187-214/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ValueScope::_reduceValues
function
private _reduceValues( values: ScopeValues | ScopeValueSets, valueCode: (n: ValueScopeName) => Code | undefined, usedValues: UsedScopeValues = {}, getCode?: (n: ValueScopeName) => Code | undefined ): Code { let code: Code = nil for (const prefix in values) { const vs = values[prefix] ...
1,286,381
b7d5cc5890504b125082de29f6b5f44d
swh:1:cnt:511992297d08f661ef4cf826eba9fbdbf0854db0;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=133-135/
5666da702c47e871be4726aeb19235e53388afc4
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/codegen/scope.ts
ValueScope::name
function
name(prefix: string): ValueScopeName { return new ValueScopeName(prefix, this._newName(prefix)) }
1,286,382
61c6523a0daf494af8bb81bd73c41573
swh:1:cnt:a0141c770c7029ce1d41db61bcd9a19fbd0c08d5;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=15-15/
6be8f226291084b775e1a99ea60dbbd42b3c66d0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/jtd/parse.ts
GenParse
type
type GenParse = (cxt: ParseCxt) => void
1,286,383
e5c5a0179d04d9b64ff4a4b3d5d77fae
swh:1:cnt:a0141c770c7029ce1d41db61bcd9a19fbd0c08d5;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=28-37/
6be8f226291084b775e1a99ea60dbbd42b3c66d0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/jtd/parse.ts
ParseCxt
type
interface ParseCxt { readonly gen: CodeGen readonly self: Ajv // current Ajv instance readonly schemaEnv: SchemaEnv readonly definitions: SchemaObjectMap schema: SchemaObject data: Code parseName: Name char: Name }
1,286,384
f4280d35d879586a4b594158ff69d8c9
swh:1:cnt:a0141c770c7029ce1d41db61bcd9a19fbd0c08d5;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=39-82/
6be8f226291084b775e1a99ea60dbbd42b3c66d0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/jtd/parse.ts
compileParser
function
function compileParser( this: Ajv, sch: SchemaEnv, definitions: SchemaObjectMap ): SchemaEnv { const _sch = getCompilingSchema.call(this, sch) if (_sch) return _sch const {es5, lines} = this.opts.code const {ownProperties} = this.opts const gen = new CodeGen(this.scope, {es5, lines, ownProperties}) co...
1,286,385
2497655718282b761e4d41f17414830d
swh:1:cnt:a0141c770c7029ce1d41db61bcd9a19fbd0c08d5;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=120-124/
6be8f226291084b775e1a99ea60dbbd42b3c66d0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/jtd/parse.ts
parseNullable
function
function parseNullable(cxt: ParseCxt, parseForm: GenParse): void { const {gen, schema, data} = cxt if (!schema.nullable) return parseForm(cxt) tryParseToken(cxt, "null", parseForm, () => gen.assign(data, null)) }
1,286,386
65e4c48561646cb6713d3a60132fbe93
swh:1:cnt:a0141c770c7029ce1d41db61bcd9a19fbd0c08d5;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=138-143/
6be8f226291084b775e1a99ea60dbbd42b3c66d0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/jtd/parse.ts
parseValues
function
function parseValues(cxt: ParseCxt): void { const {gen, schema, data} = cxt parseToken(cxt, "{") gen.assign(data, _`{}`) parseItems(cxt, "}", () => parseKeyValue(cxt, schema.values)) }
1,286,387
2076fd275abddfd964d119df385ac939
swh:1:cnt:a0141c770c7029ce1d41db61bcd9a19fbd0c08d5;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=170-202/
6be8f226291084b775e1a99ea60dbbd42b3c66d0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/jtd/parse.ts
parseDiscriminator
function
function parseDiscriminator(cxt: ParseCxt): void { const {gen, data, schema} = cxt const {discriminator, mapping} = schema parseToken(cxt, "{") gen.assign(data, _`{}`) const startPos = gen.const("pos", N.jsonPos) const value = gen.let("value") const tag = gen.let("tag") tryParseItems(cxt, "}", () => { ...
1,286,388
3815f65b0884fbcc56a21af52ed4e765
swh:1:cnt:a0141c770c7029ce1d41db61bcd9a19fbd0c08d5;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=319-327/
6be8f226291084b775e1a99ea60dbbd42b3c66d0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/jtd/parse.ts
parseNumber
function
function parseNumber(cxt: ParseCxt, maxDigits?: number): void { const {gen} = cxt skipWhitespace(cxt) gen.if( _`"-0123456789".indexOf(${jsonSlice(1)}) < 0`, () => jsonSyntaxError(cxt), () => parseWith(cxt, parseJsonNumber, maxDigits) ) }
1,286,389
e97c05e8fa5e51f80847f993a5fc198f
swh:1:cnt:a0141c770c7029ce1d41db61bcd9a19fbd0c08d5;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=352-356/
6be8f226291084b775e1a99ea60dbbd42b3c66d0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/jtd/parse.ts
getParser
function
function getParser(gen: CodeGen, sch: SchemaEnv): Code { return sch.parse ? gen.scopeValue("parse", {ref: sch.parse}) : _`${gen.scopeValue("wrapper", {ref: sch})}.parse` }
1,286,390
71ed4063a92f55933e7dcb7ebb62d46a
swh:1:cnt:a0141c770c7029ce1d41db61bcd9a19fbd0c08d5;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=358-360/
6be8f226291084b775e1a99ea60dbbd42b3c66d0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/jtd/parse.ts
parseEmpty
function
function parseEmpty(cxt: ParseCxt): void { parseWith(cxt, parseJson) }
1,286,391
e2eb07eefe7d71fa8a4bd6c900cd8434
swh:1:cnt:a0141c770c7029ce1d41db61bcd9a19fbd0c08d5;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=397-401/
6be8f226291084b775e1a99ea60dbbd42b3c66d0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/jtd/parse.ts
jsonSlice
function
function jsonSlice(len: number | Name): Code { return len === 1 ? _`${N.json}[${N.jsonPos}]` : _`${N.json}.slice(${N.jsonPos}, ${N.jsonPos}+${len})` }
1,286,392
8ddd594410caada55155c2a421dd8a01
swh:1:cnt:a0141c770c7029ce1d41db61bcd9a19fbd0c08d5;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=106-116/
6be8f226291084b775e1a99ea60dbbd42b3c66d0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/jtd/parse.ts
parseCode
function
function parseCode(cxt: ParseCxt): void { let form: JTDForm | undefined for (const key of jtdForms) { if (key in cxt.schema) { form = key break } } if (form) parseNullable(cxt, genParse[form]) else parseEmpty(cxt) }
1,286,393
7a887e5230209b25e44f7df67284c390
swh:1:cnt:a0141c770c7029ce1d41db61bcd9a19fbd0c08d5;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=162-168/
6be8f226291084b775e1a99ea60dbbd42b3c66d0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/jtd/parse.ts
parseKeyValue
function
function parseKeyValue(cxt: ParseCxt, schema: SchemaObject): void { const {gen} = cxt const key = gen.let("key") parseString({...cxt, data: key}) parseToken(cxt, ":") parsePropertyValue(cxt, key, schema) }
1,286,394
6dd669f5c9445c2e58f225672892f0bc
swh:1:cnt:a0141c770c7029ce1d41db61bcd9a19fbd0c08d5;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=211-241/
6be8f226291084b775e1a99ea60dbbd42b3c66d0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/jtd/parse.ts
parseSchemaProperties
function
function parseSchemaProperties(cxt: ParseCxt, discriminator?: string): void { const {gen, schema, data} = cxt const {properties, optionalProperties, additionalProperties} = schema parseItems(cxt, "}", () => { const key = gen.let("key") parseString({...cxt, data: key}) parseToken(cxt, ":") gen.if(f...
1,286,395
ef3d4f1f19c20995c1f9aff0c5d73a0b
swh:1:cnt:a0141c770c7029ce1d41db61bcd9a19fbd0c08d5;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=251-253/
6be8f226291084b775e1a99ea60dbbd42b3c66d0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/jtd/parse.ts
parsePropertyValue
function
function parsePropertyValue(cxt: ParseCxt, key: Name, schema: SchemaObject): void { parseCode({...cxt, schema, data: _`${cxt.data}[${key}]`}) }
1,286,396
0ba0750a855ee6bcb680ea7460650a18
swh:1:cnt:a0141c770c7029ce1d41db61bcd9a19fbd0c08d5;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=243-249/
6be8f226291084b775e1a99ea60dbbd42b3c66d0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/jtd/parse.ts
parseDefinedProperty
function
function parseDefinedProperty(cxt: ParseCxt, key: Name, schemas: SchemaObjectMap = {}): void { const {gen} = cxt for (const prop in schemas) { gen.elseIf(_`${key} === ${prop}`) parsePropertyValue(cxt, key, schemas[prop] as SchemaObject) } }
1,286,397
c7a034c80ff73226760caa01794977a0
swh:1:cnt:a0141c770c7029ce1d41db61bcd9a19fbd0c08d5;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=302-317/
6be8f226291084b775e1a99ea60dbbd42b3c66d0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/jtd/parse.ts
parseEnum
function
function parseEnum(cxt: ParseCxt): void { const {gen, data, schema} = cxt const enumSch = schema.enum parseToken(cxt, '"') // TODO loopEnum gen.if(false) for (const value of enumSch) { const valueStr = JSON.stringify(value).slice(1) // remove starting quote gen.elseIf(_`${jsonSlice(valueStr.length)}...
1,286,398
28de45e544e8b25c026818289a795533
swh:1:cnt:a0141c770c7029ce1d41db61bcd9a19fbd0c08d5;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=204-209/
6be8f226291084b775e1a99ea60dbbd42b3c66d0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/jtd/parse.ts
parseProperties
function
function parseProperties(cxt: ParseCxt): void { const {gen, data} = cxt parseToken(cxt, "{") gen.assign(data, _`{}`) parseSchemaProperties(cxt) }
1,286,399
05c837b4f98a70d3ed270b95a0f60651
swh:1:cnt:a0141c770c7029ce1d41db61bcd9a19fbd0c08d5;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=366-371/
6be8f226291084b775e1a99ea60dbbd42b3c66d0
wlbdashboard
wmcs
node_modules/workbox-build/node_modules/ajv/lib/compile/jtd/parse.ts
partialParse
function
function partialParse(cxt: ParseCxt, parseFunc: Name, args?: SafeExpr): void { const {gen, data} = cxt gen.assign(data, _`${parseFunc}(${N.json}, ${N.jsonPos}${args ? _`, ${args}` : nil})`) gen.assign(N.jsonPos, _`${parseFunc}.position`) gen.if(_`${data} === undefined`, () => parsingError(cxt, _`${parseFunc}.me...