Skip to main content

@terascope/data-mate / vector/utils

vector/utils

Type Aliases

ParsedNumericObject

ParsedNumericObject: object

Type declaration

original?

optional original: string

parsed

parsed: number | bigint

Source

data-mate/src/vector/utils.ts:85

Functions

_newVector()

_newVector<T>(data, options): Vector<T>

Type parameters

Type parameter
T

Parameters

ParameterType
dataDataBuckets<any>
optionsVectorOptions

Returns

Vector<T>

Source

data-mate/src/vector/utils.ts:16


getCommonFieldType()

getCommonFieldType(field, a, b): FieldType

Given two field types, return a common field type format. This will be flexible for string like and number like values.

Parameters

ParameterType
fieldstring
aFieldType
bFieldType

Returns

FieldType

Source

data-mate/src/vector/utils.ts:197


getCommonTupleType()

getCommonTupleType(tupleField, childConfig): FieldType

Parameters

ParameterType
tupleFieldstring
childConfigundefined | DataTypeFields

Returns

FieldType

Source

data-mate/src/vector/utils.ts:221


getNumericValues()

getNumericValues(value, allowIP): NumericValuesResult

Get all of the numeric values from a value or Vector (will return as [] of number|bigint UNLESS allowing IP and value is IP, then will return object with original value and parsed to number)

Parameters

ParameterTypeDefault value
valueunknownundefined
allowIPbooleanfalse

Returns

NumericValuesResult

Source

data-mate/src/vector/utils.ts:102


isFloatLike()

isFloatLike(type): boolean

Parameters

ParameterType
typeFieldType

Returns

boolean

Source

data-mate/src/vector/utils.ts:166


isIntLike()

isIntLike(type): boolean

Parameters

ParameterType
typeFieldType

Returns

boolean

Source

data-mate/src/vector/utils.ts:173


isNumberLike()

isNumberLike(type): boolean

Parameters

ParameterType
typeFieldType

Returns

boolean

Source

data-mate/src/vector/utils.ts:160


isStringLike()

isStringLike(type): boolean

Parameters

ParameterType
typeFieldType

Returns

boolean

Source

data-mate/src/vector/utils.ts:180