Skip to main content

@terascope/data-mate / column/utils

column/utils

Functions

dynamicMapVectorEach()

dynamicMapVectorEach<T, R>(vector, builder, dynamicFn): Vector<R>

Type parameters

Type parameterValue
T-
RT

Parameters

ParameterType
vectorVector<T> | ListVector<T>
builderBuilder<R>
dynamicFn(index) => (value, index) => Maybe<R | readonly Maybe<R>[]>

Returns

Vector<R>

Source

data-mate/src/column/utils.ts:60


dynamicMapVectorEachValue()

dynamicMapVectorEachValue<T, R>(vector, builder, dynamicFn): Vector<R>

Type parameters

Type parameterValue
T-
RT

Parameters

ParameterType
vectorVector<T> | ListVector<T>
builderBuilder<R>
dynamicFn(index) => (value, index) => Maybe<R>

Returns

Vector<R>

Source

data-mate/src/column/utils.ts:77


getFieldTypesFromFieldConfigAndChildConfig()

getFieldTypesFromFieldConfigAndChildConfig(config, childConfig): readonly FieldType[]

This was created for validating the accepts

Parameters

ParameterType
configReadonly<DataTypeFieldConfig>
childConfigundefined | DataTypeFields | ReadonlyDataTypeFields

Returns

readonly FieldType[]

Source

data-mate/src/column/utils.ts:130


getVectorId()

getVectorId(vector): string

Parameters

ParameterType
vectorVector<any>

Returns

string

Source

data-mate/src/column/utils.ts:13


mapVectorEach()

mapVectorEach<T, R>(vector, builder, fn): Vector<R>

Type parameters

Type parameterValue
T-
RT

Parameters

ParameterType
vectorVector<T> | ListVector<T>
builderBuilder<R>
fn(value, index) => Maybe<R | readonly Maybe<R>[]>

Returns

Vector<R>

Source

data-mate/src/column/utils.ts:21


mapVectorEachValue()

mapVectorEachValue<T, R>(vector, builder, fn): Vector<R>

Type parameters

Type parameterValue
T-
RT

Parameters

ParameterType
vectorVector<T> | ListVector<T>
builderBuilder<R>
fn(value, index) => Maybe<R>

Returns

Vector<R>

Source

data-mate/src/column/utils.ts:36


validateAccepts()

validateAccepts(accepts, types): Error | undefined

Parameters

ParameterType
acceptsreadonly FieldType[]
typesreadonly FieldType[]

Returns

Error | undefined

Source

data-mate/src/column/utils.ts:141


validateFieldTransformArgs()

validateFieldTransformArgs<A>(schema?, requiredArgs?, args?): A

Type parameters

Type parameter
A extends Record<string, any>

Parameters

ParameterType
schema?DataTypeFields
requiredArgs?string[]
args?Partial<A>

Returns

A

Source

data-mate/src/column/utils.ts:100