@terascope/data-mate / builder/Builder
builder/Builder
Index
Classes
Class | Description |
---|---|
Builder | Since Vectors are immutable, a Builder can be used to construct a Vector. When values are inserted they are coerced and validated. |
Interfaces
Interface | Description |
---|---|
BuilderOptions | A list of Builder Options |
Type Aliases
ValueFromFn()<T>
ValueFromFn<
T
>: (value
) =>T
Coerce a value so it can be stored in the builder
Type parameters
Type parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
value | unknown |
Returns
T
Source
data-mate/src/builder/Builder.ts:201
Functions
copyVectorToBuilder()
copyVectorToBuilder<
T
,R
>(vector
,builder
):Vector
<R
>
Copy the values from a Vector to a Builder
Type parameters
Type parameter |
---|
T |
R |
Parameters
Parameter | Type |
---|---|
vector | Vector <T > | ListVector <T > |
builder | Builder <R > |
Returns
Vector
<R
>
Source
data-mate/src/builder/Builder.ts:226
isBuilder()
isBuilder<
T
>(input
):input is Builder<T>
Returns true if the input is a Builder
Type parameters
Type parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is Builder<T>
Source
data-mate/src/builder/Builder.ts:194
transformVectorToBuilder()
transformVectorToBuilder<
T
,R
>(vector
,builder
,transform
):Vector
<R
>
Copy the values from a Vector to a Builder
Type parameters
Type parameter |
---|
T |
R |
Parameters
Parameter | Type |
---|---|
vector | Vector <T > | ListVector <T > |
builder | Builder <R > |
transform | (value , index ) => Maybe <R > | readonly Maybe <R >[] |
Returns
Vector
<R
>