SpecBuilderMethods
Defined in: extract/data-spec-builder.ts:33
Methods inherited from SpecBuilder, available on every DataSpecProxy node.
Properties
Section titled “Properties”
readonlypath: readonly (string|number)[]
Defined in: extract/data-spec-builder.ts:57
Current path
Methods
Section titled “Methods”array()
Section titled “array()”array<
S>(itemMapper):ArraySpec<S>
Defined in: extract/data-spec-builder.ts:49
Map over array items
Type Parameters
Section titled “Type Parameters”S extends Spec
Parameters
Section titled “Parameters”itemMapper
Section titled “itemMapper”(item) => S
Returns
Section titled “Returns”ArraySpec<S>
at(
index):SpecBuilderMethods
Defined in: extract/data-spec-builder.ts:37
Navigate to an array element by index
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”SpecBuilderMethods
boolean()
Section titled “boolean()”boolean():
FormatSpec<JsonStep,"boolean">
Defined in: extract/data-spec-builder.ts:45
Extract as boolean
Returns
Section titled “Returns”FormatSpec<JsonStep, "boolean">
get(
key):DataSpecProxy<Record<string,unknown>>
Defined in: extract/data-spec-builder.ts:35
Navigate to a property by key
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”DataSpecProxy<Record<string, unknown>>
match()
Section titled “match()”Defined in: extract/data-spec-builder.ts:55
Conditional extraction
Parameters
Section titled “Parameters”…(MatchCase<Spec> | MatchDefault<Spec>)[]
Returns
Section titled “Returns”null()
Section titled “null()”null():
FormatSpec<JsonStep,"null">
Defined in: extract/data-spec-builder.ts:47
Extract as null
Returns
Section titled “Returns”FormatSpec<JsonStep, "null">
number()
Section titled “number()”number():
FormatSpec<JsonStep,"number">
Defined in: extract/data-spec-builder.ts:43
Extract as number
Returns
Section titled “Returns”FormatSpec<JsonStep, "number">
numbers()
Section titled “numbers()”numbers():
ArraySpec<FormatSpec<JsonStep,"number">>
Defined in: extract/data-spec-builder.ts:53
Extract array of numbers
Returns
Section titled “Returns”ArraySpec<FormatSpec<JsonStep, "number">>
string()
Section titled “string()”string():
FormatSpec<JsonStep,"string">
Defined in: extract/data-spec-builder.ts:41
Extract as string
Returns
Section titled “Returns”FormatSpec<JsonStep, "string">
strings()
Section titled “strings()”strings():
ArraySpec<FormatSpec<JsonStep,"string">>
Defined in: extract/data-spec-builder.ts:51
Extract array of strings
Returns
Section titled “Returns”ArraySpec<FormatSpec<JsonStep, "string">>
to(…
keys):SpecBuilderMethods
Defined in: extract/data-spec-builder.ts:39
Navigate multiple levels at once
Parameters
Section titled “Parameters”…(string | number)[]
Returns
Section titled “Returns”SpecBuilderMethods