Data-Mate: `Vector Utils`
Table of contents
Type Aliases
Functions
- _newVector
- getCommonFieldType
- getCommonTupleType
- getNumericValues
- isFloatLike
- isIntLike
- isNumberLike
- isStringLike
Type Aliases
ParsedNumericObject
Ƭ ParsedNumericObject: Object
Type declaration
Name | Type | |
---|---|---|
original? | string | |
parsed | number \ | bigint |
Defined in
data-mate/src/vector/utils.ts:87
Functions
_newVector
▸ _newVector<T
>(data
, options
): Vector
<T
>
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
data | DataBuckets <any > |
options | VectorOptions |
Returns
Vector
<T
>
Defined in
data-mate/src/vector/utils.ts:18
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
Name | Type |
---|---|
field | string |
a | FieldType |
b | FieldType |
Returns
FieldType
Defined in
data-mate/src/vector/utils.ts:199
getCommonTupleType
▸ getCommonTupleType(tupleField
, childConfig
): FieldType
Parameters
Name | Type | |
---|---|---|
tupleField | string | |
childConfig | undefined \ | DataTypeFields |
Returns
FieldType
Defined in
data-mate/src/vector/utils.ts:223
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
Name | Type | Default value |
---|---|---|
value | unknown | undefined |
allowIP | boolean | false |
Returns
NumericValuesResult
Defined in
data-mate/src/vector/utils.ts:104
isFloatLike
▸ isFloatLike(type
): boolean
Parameters
Name | Type |
---|---|
type | FieldType |
Returns
boolean
Defined in
data-mate/src/vector/utils.ts:168
isIntLike
▸ isIntLike(type
): boolean
Parameters
Name | Type |
---|---|
type | FieldType |
Returns
boolean
Defined in
data-mate/src/vector/utils.ts:175
isNumberLike
▸ isNumberLike(type
): boolean
Parameters
Name | Type |
---|---|
type | FieldType |
Returns
boolean
Defined in
data-mate/src/vector/utils.ts:162
isStringLike
▸ isStringLike(type
): boolean
Parameters
Name | Type |
---|---|
type | FieldType |
Returns
boolean