@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
Parameter | Type |
---|---|
data | DataBuckets <any > |
options | VectorOptions |
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
Parameter | Type |
---|---|
field | string |
a | FieldType |
b | FieldType |
Returns
FieldType
Source
data-mate/src/vector/utils.ts:197
getCommonTupleType()
getCommonTupleType(
tupleField
,childConfig
):FieldType
Parameters
Parameter | Type |
---|---|
tupleField | string |
childConfig | undefined | 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
Parameter | Type | Default value |
---|---|---|
value | unknown | undefined |
allowIP | boolean | false |
Returns
NumericValuesResult
Source
data-mate/src/vector/utils.ts:102
isFloatLike()
isFloatLike(
type
):boolean
Parameters
Parameter | Type |
---|---|
type | FieldType |
Returns
boolean
Source
data-mate/src/vector/utils.ts:166
isIntLike()
isIntLike(
type
):boolean
Parameters
Parameter | Type |
---|---|
type | FieldType |
Returns
boolean
Source
data-mate/src/vector/utils.ts:173
isNumberLike()
isNumberLike(
type
):boolean
Parameters
Parameter | Type |
---|---|
type | FieldType |
Returns
boolean
Source
data-mate/src/vector/utils.ts:160
isStringLike()
isStringLike(
type
):boolean
Parameters
Parameter | Type |
---|---|
type | FieldType |
Returns
boolean