@terascope/job-components / index
index
Namespaces
Namespace | Description |
---|---|
Logger | - |
Enumerations
Enumeration | Description |
---|---|
DataEncoding | Available data encoding types for a DataEntity |
RecoveryCleanupType | - |
StringEntropy | - |
Classes
Class | Description |
---|---|
BigLRUMap | - |
BigMap | Avoid v8 maximum size for Map by spreading the cache across multiple Maps. This class has the same API as Map but minus more differences in ->set and ->forEach |
BigSet | Avoid v8 maximum size for Set by spreading the cache across multiple Sets. This class has the same API as Set but minus more differences in ->add and ->forEach |
Collector | An in-memory record collector, useful for batch data to a certain size or after a certain amount of time has passed. |
DataEntity | A wrapper for data that can hold additional metadata properties. A DataEntity should be essentially transparent to use within operations. |
EventLoop | A simple class for detecting when the event loop is blocked. The recommend use is to call EventLoop.init(logger) and then await EventLoop.wait() where you want to slow down potentially long running synchronous code |
FlexibleArray | This used to ignore the init size of the array in LRUMap. Doing this will avoid running out of memory at 12 million records. |
Logger | - |
Queue | A basic FIFO queue |
TSError | A custom Error class with additional properties, like statusCode and fatalError |
Interfaces
Interface | Description |
---|---|
AnyObject | A simple object with any values |
APIConfig | APIConfig is the configuration for loading APIs and Observers into a ExecutionContext. |
ConnectionConfig | - |
DataEntityMetadata | DataEntities have conventional metadata properties that can track source, destination and other process information. |
ElasticsearchError | - |
EmptyObject | - |
EncodingConfig | an encoding focused interfaces |
ExecutionConfig | - |
InNumberRangeArg | - |
JobConfig | - |
JobConfigParams | - |
ListOfRecursiveArraysOrValues | A simple definitions of array |
Many | A simple definitions of array |
OpConfig | OpConfig is the configuration that user specifies for a Operation. The only required property is _op since that is used to find the operation. |
PRetryConfig | - |
RecursiveArray | A simple definitions of array |
RouteSenderAPI | Used for sending data to particular index/topic/file/table in a storage system. This is used by the routed sender in the standard-assets |
Slice | A trackable set of work to be preformed by a "Worker" |
SliceAnalyticsData | - |
SliceRequest | The metadata created by the Slicer and ran through a job pipeline |
SysConfig | - |
TerafoundationConfig | - |
TerasliceConfig | - |
TSErrorConfig | - |
TSErrorContext | A simple object with any values |
ValidatedJobConfig | - |
Type Aliases
_DataEntityMetadata<M>
_DataEntityMetadata<
M
>:M
&DataEntityMetadata
&AnyObject
Defined in: packages/utils/dist/src/entities/interfaces.d.ts:7
Type Parameters
Type Parameter |
---|
M |
_DataEntityMetadataType
_DataEntityMetadataType:
DataEntityMetadata
|AnyObject
Defined in: packages/utils/dist/src/entities/interfaces.d.ts:6
AdjustDateArgs
AdjustDateArgs: {
expr
:string
; } | {days
:number
;hours
:number
;milliseconds
:number
;minutes
:number
;months
:number
;seconds
:number
;weeks
:number
;years
:number
; }
Defined in: packages/utils/dist/src/dates.d.ts:128
Assignment
Assignment:
"assets_service"
|"cluster_master"
|"node_master"
|"execution_controller"
|"worker"
Defined in: packages/types/dist/src/teraslice.d.ts:446
ClusterManagerType
ClusterManagerType:
"native"
|"kubernetes"
|"kubernetesV2"
Defined in: packages/types/dist/src/teraslice.d.ts:2
CreateClientFactoryFn()
CreateClientFactoryFn: (
config
,logger
,options
) =>Promise
<ConnectorOutput
>
Defined in: packages/types/dist/src/terafoundation.d.ts:56
Parameters
Parameter | Type |
---|---|
config | Record <string , any > |
logger | Logger |
options | ConnectionConfig |
Returns
Promise
<ConnectorOutput
>
DataArrayInput
Defined in: packages/utils/dist/src/entities/data-entity.d.ts:152
DataEntityMetadataValue<M>
DataEntityMetadataValue<
M
>: keyofDataEntityMetadata
| keyofM
|string
|number
Defined in: packages/utils/dist/src/entities/interfaces.d.ts:8
Type Parameters
Type Parameter |
---|
M |
DataInput
DataInput:
Record
<string
,any
> |DataEntity
Defined in: packages/utils/dist/src/entities/data-entity.d.ts:151
DeadLetterAction
DeadLetterAction:
"throw"
|"log"
|"none"
|string
Defined in: packages/types/dist/src/teraslice.d.ts:295
available dead letter queue actions
DeadLetterAPIFn()
DeadLetterAPIFn: (
input
,err
) =>void
Defined in: packages/types/dist/src/teraslice.d.ts:297
A supported DeadLetterAPIFn
Parameters
Parameter | Type |
---|---|
input | any |
err | Error |
Returns
void
Diff<T, U>
Diff<
T
,U
>:T
extendsU
?never
:T
Defined in: packages/types/dist/src/utility.d.ts:74
Remove types from T that are assignable to U
Type Parameters
Type Parameter |
---|
T |
U |
EntityMetadataValue<M, K>
EntityMetadataValue<
M
,K
>:K
extends keyofDataEntityMetadata
?DataEntityMetadata
[K
] :K
extends keyofM
?M
[K
] :any
Defined in: packages/utils/dist/src/entities/interfaces.d.ts:9
Type Parameters
Type Parameter |
---|
M |
K |
Filter<T, U>
Filter<
T
,U
>:T
extendsU
?T
:never
Defined in: packages/types/dist/src/utility.d.ts:78
Remove types from T that are NOT assignable to U
Type Parameters
Type Parameter |
---|
T |
U |
FilteredResult<T, I, E>
FilteredResult<
T
,I
,E
>:{ [P in keyof T]: P extends I ? T[P] : P extends E ? never : T[P] }
Defined in: packages/types/dist/src/utility.d.ts:86
Filters the keys of an object (T), by list of included keys (I) and excluded (E)
Type Parameters
Type Parameter |
---|
T |
I extends keyof T |
E extends keyof T |
LifeCycle
LifeCycle:
"once"
|"persistent"
Defined in: packages/types/dist/src/teraslice.d.ts:176
Nil
Nil:
null
|undefined
Defined in: packages/types/dist/src/utility.d.ts:43
Omit<T, K>
Omit<
T
,K
>:Pick
<T
,Exclude
<keyofT
,K
>>
Defined in: packages/types/dist/src/utility.d.ts:7
Omit the properties available to type. Useful for excluding properties from a type
Type Parameters
Type Parameter |
---|
T |
K extends keyof T |
Example
`Omit<{ a: number, b: number, c: number }, 'b'|'c'> // => { a: 1 }`
Optional<T, K>
Optional<
T
,K
>: { [P in keyof T]: P extends K ? NonNullable<T[P]> | undefined : NonNullable<T[P]> }
Defined in: packages/types/dist/src/utility.d.ts:40
Like Partial but makes certain properties optional
Type Parameters
Type Parameter |
---|
T |
K extends keyof T |
Example
`Optional<{ a: number, b: number }, 'b'>`
Override<T1, T2>
Override<
T1
,T2
>:{ [P in keyof T1]: P extends keyof T1 ? T2[P] : T1[P] }
Defined in: packages/types/dist/src/utility.d.ts:22
Override specific properties on a type
Type Parameters
Type Parameter |
---|
T1 |
T2 extends { [P in keyof T2]: P extends keyof T1 ? T2[P] : never } |
Example
`Override<{ a: number, b: number }, { b: string }>`
Overwrite<T1, T2>
Overwrite<
T1
,T2
>:{ [P in Exclude<keyof T1, keyof T2>]: T1[P] }
&T2
Defined in: packages/types/dist/src/utility.d.ts:14
Overwrite a simple type with different properties. Useful changing and adding additional properties
Type Parameters
Type Parameter |
---|
T1 |
T2 |
Example
`Overwrite<{ a: number, b: number }, { b?: number }>`
PartialDeep<T>
PartialDeep<
T
>:{ [P in keyof T]?: PartialDeep<T[P]> }
Defined in: packages/types/dist/src/utility.d.ts:68
A deep partial object
Type Parameters
Type Parameter |
---|
T |
PWhileOptions
PWhileOptions:
object
Defined in: packages/utils/dist/src/promises.d.ts:54
Type declaration
enabledJitter?
optional
enabledJitter:boolean
enable jitter to stagger requests
error?
optional
error:string
error that can be expressed if the timer ends because the function does not return true
maxJitter?
optional
maxJitter:number
the maximum the jitter wait time will be (in milliseconds), defaults to 3x the minJitter setting, but less than timeoutMs
minJitter?
optional
minJitter:number
the minimum the jitter wait time will be (in milliseconds), defaults to 100ms
name?
optional
name:string
Defaults
to "Request"
timeoutMs?
optional
timeoutMs:number
Defaults
to -1 which is never
Required<T, K>
Required<
T
,K
>: { [P in keyof T]: P extends K ? NonNullable<T[P]> : NonNullable<T[P]> | undefined }
Defined in: packages/types/dist/src/utility.d.ts:32
Like Partial but makes certain properties required
Type Parameters
Type Parameter |
---|
T |
K extends keyof T |
Example
`Required<{ a: number, b: number }, 'b'>`
StringEntropyFN()
StringEntropyFN: (
input
) =>number
Defined in: packages/utils/dist/src/strings.d.ts:268
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
TYPE_ENTITY_METADATA_KEY
TYPE_ENTITY_METADATA_KEY:
"___EntityMetadata"
Defined in: packages/utils/dist/src/entities/interfaces.d.ts:3
TYPE_IS_DATAENTITY_KEY
TYPE_IS_DATAENTITY_KEY:
"__isDataEntity"
Defined in: packages/utils/dist/src/entities/interfaces.d.ts:2
Unpacked<T>
Unpacked<
T
>:T
extends infer U[] ?U
:T
extends (...args
) => infer U ?U
:T
extendsPromise
<infer U> ?U
:T
Defined in: packages/types/dist/src/utility.d.ts:92
From https://www.typescriptlang.org/docs/handbook/advanced-types.html#type-inference-in-conditional-types
Type Parameters
Type Parameter |
---|
T |
ValueOf<T>
ValueOf<
T
>:T
[keyofT
]
Defined in: packages/types/dist/src/utility.d.ts:82
Get the types object (the opposite of keyof)
Type Parameters
Type Parameter |
---|
T |
WithoutNil<T>
WithoutNil<
T
>:{ [P in keyof T]: T[P] extends Nil ? never : T[P] }
Defined in: packages/types/dist/src/utility.d.ts:49
Without null or undefined properties
Type Parameters
Type Parameter |
---|
T |
Variables
__ENTITY_METADATA_KEY
const
__ENTITY_METADATA_KEY:TYPE_ENTITY_METADATA_KEY
Defined in: packages/utils/dist/src/entities/interfaces.d.ts:5
__IS_DATAENTITY_KEY
const
__IS_DATAENTITY_KEY:TYPE_IS_DATAENTITY_KEY
Defined in: packages/utils/dist/src/entities/interfaces.d.ts:4
dataEncodings
const
dataEncodings: readonlyDataEncoding
[]
Defined in: packages/utils/dist/src/entities/interfaces.d.ts:52
A list of supported encoding formats
geoHash
geoHash:
object
Defined in: types/latlon-geohash/index.d.ts:34
Type declaration
adjacent()
adjacent: (
geoHash
,direction
) =>any
Parameters
Parameter | Type |
---|---|
geoHash | string |
direction | "N" | "S" | "E" | "W" |
Returns
any
adjacent cell to given geohash in specified direction (N/S/E/W).
bounds()
bounds: (
geoHash
) =>object
Parameters
Parameter | Type |
---|---|
geoHash | string |
Returns
object
bounds of given geohash.
ne
ne:
number
sw
sw:
number
decode()
decode: (
geoHash
) =>object
Parameters
Parameter | Type |
---|---|
geoHash | string |
Returns
object
of centre of given geohash, to appropriate precision.
lat
lat:
number
lon
lon:
number
encode()
encode: (
lat
,lon
,precision
?) =>string
encode latitude/longitude point to geohash of given precision (number of characters in resulting geohash); if precision is not specified, it is inferred from precision of latitude/longitude values.
Parameters
Parameter | Type |
---|---|
lat | number |
lon | number |
precision ? | number |
Returns
string
neighbours()
neighbours: (
geoHash
) =>object
Parameters
Parameter | Type |
---|---|
geoHash | string |
Returns
object
all 8 adjacent cells (n/ne/e/se/s/sw/w/nw) to given geohash.
n
n:
number
ne
ne:
number
nw
nw:
number
s
s:
number
se
se:
number
sw
sw:
number
w
w:
number
geoJSONTypes
const
geoJSONTypes:string
[]
Defined in: packages/utils/dist/src/geo.d.ts:3
getDurationFunc
const
getDurationFunc:object
Defined in: packages/utils/dist/src/dates.d.ts:89
Type declaration
businessDays
businessDays: typeof
differenceInBusinessDays
calendarDays
calendarDays: typeof
differenceInCalendarDays
calendarISOWeekYears
calendarISOWeekYears: typeof
differenceInCalendarISOWeekYears
calendarMonths
calendarMonths: typeof
differenceInCalendarMonths
calendarQuarters
calendarQuarters: typeof
differenceInCalendarQuarters
calendarWeeks
calendarWeeks: typeof
differenceInCalendarISOWeeks
calendarYears
calendarYears: typeof
differenceInCalendarYears
days
days: typeof
differenceInDays
hours
hours: typeof
differenceInHours
ISOWeekYears
ISOWeekYears: typeof
differenceInISOWeekYears
milliseconds
milliseconds: typeof
differenceInMilliseconds
minutes
minutes: typeof
differenceInMinutes
months
months: typeof
differenceInMonths
quarters
quarters: typeof
differenceInQuarters
seconds
seconds: typeof
differenceInSeconds
weeks
weeks: typeof
differenceInWeeks
years
years: typeof
differenceInYears
isCI
const
isCI:boolean
Defined in: packages/utils/dist/src/env.d.ts:4
isDev
const
isDev:boolean
Defined in: packages/utils/dist/src/env.d.ts:3
isProd
const
isProd:boolean
Defined in: packages/utils/dist/src/env.d.ts:1
isTest
const
isTest:boolean
Defined in: packages/utils/dist/src/env.d.ts:2
logLevels
const
logLevels:object
Defined in: packages/utils/dist/src/logger.d.ts:8
Type declaration
debug
debug:
number
error
error:
number
fatal
fatal:
number
info
info:
number
trace
trace:
number
warn
warn:
number
LOWER_CASE_CHARS
const
LOWER_CASE_CHARS:object
Defined in: packages/utils/dist/src/strings.d.ts:75
Type declaration
a
readonly
a:true
b
readonly
b:true
c
readonly
c:true
d
readonly
d:true
e
readonly
e:true
f
readonly
f:true
g
readonly
g:true
h
readonly
h:true
i
readonly
i:true
j
readonly
j:true
k
readonly
k:true
l
readonly
l:true
m
readonly
m:true
n
readonly
n:true
o
readonly
o:true
p
readonly
p:true
q
readonly
q:true
r
readonly
r:true
s
readonly
s:true
t
readonly
t:true
u
readonly
u:true
v
readonly
v:true
w
readonly
w:true
x
readonly
x:true
y
readonly
y:true
z
readonly
z:true
MAX_STRING_LENGTH_BEFORE_MD5
const
MAX_STRING_LENGTH_BEFORE_MD5:1024
=1024
Defined in: packages/utils/dist/src/type-coercion.d.ts:24
If we have a hash that is a long value we want to ensure that the value doesn't explode the memory since we may be using that value as a key. So when a string exceeds this specified length we can reduce its length to 35 characters by using md5
NUM_CHARS
const
NUM_CHARS:object
Defined in: packages/utils/dist/src/strings.d.ts:131
Type declaration
0
readonly
0:true
1
readonly
1:true
2
readonly
2:true
3
readonly
3:true
4
readonly
4:true
5
readonly
5:true
6
readonly
6:true
7
readonly
7:true
8
readonly
8:true
9
readonly
9:true
STATUS_CODES
const
STATUS_CODES:object
Defined in: packages/utils/dist/src/status-codes.d.ts:1
Type declaration
100
100:
string
101
101:
string
102
102:
string
103
103:
string
200
200:
string
201
201:
string
202
202:
string
203
203:
string
204
204:
string
205
205:
string
206
206:
string
207
207:
string
208
208:
string
226
226:
string
300
300:
string
301
301:
string
302
302:
string
303
303:
string
304
304:
string
305
305:
string
307
307:
string
308
308:
string
400
400:
string
401
401:
string
402
402:
string
403
403:
string
404
404:
string
405
405:
string
406
406:
string
407
407:
string
408
408:
string
409
409:
string
410
410:
string
411
411:
string
412
412:
string
413
413:
string
414
414:
string
415
415:
string
416
416:
string
417
417:
string
418
418:
string
421
421:
string
422
422:
string
423
423:
string
424
424:
string
425
425:
string
426
426:
string
428
428:
string
429
429:
string
431
431:
string
451
451:
string
500
500:
string
501
501:
string
502
502:
string
503
503:
string
504
504:
string
505
505:
string
506
506:
string
507
507:
string
508
508:
string
509
509:
string
510
510:
string
511
511:
string
timezoneOffset
const
timezoneOffset:number
Defined in: packages/utils/dist/src/dates.d.ts:3
UPPER_CASE_CHARS
const
UPPER_CASE_CHARS:object
Defined in: packages/utils/dist/src/strings.d.ts:103
Type declaration
A
readonly
A:true
B
readonly
B:true
C
readonly
C:true
D
readonly
D:true
E
readonly
E:true
F
readonly
F:true
G
readonly
G:true
H
readonly
H:true
I
readonly
I:true
J
readonly
J:true
K
readonly
K:true
L
readonly
L:true
M
readonly
M:true
N
readonly
N:true
O
readonly
O:true
P
readonly
P:true
Q
readonly
Q:true
R
readonly
R:true
S
readonly
S:true
T
readonly
T:true
U
readonly
U:true
V
readonly
V:true
W
readonly
W:true
X
readonly
X:true
Y
readonly
Y:true
Z
readonly
Z:true
WORD_CHARS
const
WORD_CHARS:object
Defined in: packages/utils/dist/src/strings.d.ts:148
Type declaration
0
readonly
0:true
1
readonly
1:true
2
readonly
2:true
3
readonly
3:true
4
readonly
4:true
5
readonly
5:true
6
readonly
6:true
7
readonly
7:true
8
readonly
8:true
9
readonly
9:true
a
readonly
a:true
A
readonly
A:true
b
readonly
b:true
B
readonly
B:true
c
readonly
c:true
C
readonly
C:true
d
readonly
d:true
D
readonly
D:true
e
readonly
e:true
E
readonly
E:true
f
readonly
f:true
F
readonly
F:true
g
readonly
g:true
G
readonly
G:true
h
readonly
h:true
H
readonly
H:true
i
readonly
i:true
I
readonly
I:true
j
readonly
j:true
J
readonly
J:true
k
readonly
k:true
K
readonly
K:true
l
readonly
l:true
L
readonly
L:true
m
readonly
m:true
M
readonly
M:true
n
readonly
n:true
N
readonly
N:true
o
readonly
o:true
O
readonly
O:true
p
readonly
p:true
P
readonly
P:true
q
readonly
q:true
Q
readonly
Q:true
r
readonly
r:true
R
readonly
R:true
s
readonly
s:true
S
readonly
S:true
t
readonly
t:true
T
readonly
T:true
u
readonly
u:true
U
readonly
U:true
v
readonly
v:true
V
readonly
V:true
w
readonly
w:true
W
readonly
W:true
x
readonly
x:true
X
readonly
X:true
y
readonly
y:true
Y
readonly
Y:true
z
readonly
z:true
Z
readonly
Z:true
WORD_SEPARATOR_CHARS
const
WORD_SEPARATOR_CHARS:object
Defined in: packages/utils/dist/src/strings.d.ts:143
Type declaration
readonly
** **:true
_
readonly
_:true
-
readonly
-:true
Functions
addToDate()
addToDate(
input
,args
):number
Defined in: packages/utils/dist/src/dates.d.ts:140
Parameters
Parameter | Type |
---|---|
input | unknown |
args | AdjustDateArgs |
Returns
number
addToDateFP()
addToDateFP(
args
): (input
) =>number
Defined in: packages/utils/dist/src/dates.d.ts:141
Parameters
Parameter | Type |
---|---|
args | AdjustDateArgs |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
and()
and<
T
>(...fns
):T
Defined in: packages/utils/dist/src/fp.d.ts:9
Curry one or more functions, where all must returned truthy values
Type Parameters
Type Parameter |
---|
T extends AnyFn |
Parameters
Parameter | Type |
---|---|
...fns | T [] |
Returns
T
bigIntToJSON()
bigIntToJSON(
int
):string
|number
Defined in: packages/utils/dist/src/numbers.d.ts:19
Convert a BigInt to either a number or a string
Parameters
Parameter | Type |
---|---|
int | bigint |
Returns
string
| number
castArray()
castArray<
T
>(input
):T
[]
Defined in: packages/utils/dist/src/arrays.d.ts:7
A simplified implementation of lodash castArray
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
input | undefined | null | T | T [] | readonly T [] |
Returns
T
[]
chunk()
chunk<
T
>(dataArray
,size
):T
[][]
Defined in: packages/utils/dist/src/arrays.d.ts:32
Chunk an array into specific sizes
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
dataArray | Iterable <T > |
size | number |
Returns
T
[][]
chunkIter()
chunkIter<
T
>(dataArray
,size
):Iterable
<T
[]>
Defined in: packages/utils/dist/src/arrays.d.ts:34
Chunk an array into specific size, by using an iterator
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
dataArray | Iterable <T > |
size | number |
Returns
Iterable
<T
[]>
clone()
clone(
input
):any
Defined in: packages/utils/dist/src/deps.d.ts:20
Shallow clone an object
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
any
cloneDeep()
cloneDeep<
T
>(input
):T
Defined in: packages/utils/dist/src/deps.d.ts:21
Type Parameters
Type Parameter | Default type |
---|---|
T | any |
Parameters
Parameter | Type |
---|---|
input | T |
Returns
T
coerceToGeoBoundary()
coerceToGeoBoundary(
input
):GeoBoundary
Defined in: packages/utils/dist/src/type-coercion.d.ts:17
Convert value to a GeoBoundary data type, a GeoBoundary is two GeoPoints, one representing the top left, the other representing the bottom right
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
GeoBoundary
coerceToGeoPoint()
coerceToGeoPoint(
input
):GeoPoint
Defined in: packages/utils/dist/src/type-coercion.d.ts:11
Convert value to a GeoPoint data type
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
GeoPoint
coerceToNumberType()
coerceToNumberType(
type
): (input
) =>number
|bigint
Defined in: packages/utils/dist/src/type-coercion.d.ts:7
Parameters
Parameter | Type |
---|---|
type | FieldType |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
| bigint
coerceToType()
coerceToType<
T
>(fieldConfig
,childConfig
?):CoerceFN
<T
>
Defined in: packages/utils/dist/src/type-coercion.d.ts:6
Will return a function that will coerce the input values to the DataTypeFieldConfig provided. The parameter childConfig is only necessary with Tuple or Object field types
Type Parameters
Type Parameter | Default type |
---|---|
T | unknown |
Parameters
Parameter | Type |
---|---|
fieldConfig | DataTypeFieldConfig |
childConfig ? | DataTypeFields |
Returns
CoerceFN
<T
>
concat()
Call Signature
concat<
T
>(arr
,arr1
?): readonlyT
[]
Defined in: packages/utils/dist/src/arrays.d.ts:12
Concat and unique the items in the array Any non-array value will be converted to an array
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
arr | T | T [] |
arr1 ? | T | T [] |
Returns
readonly T
[]
Call Signature
concat<
T
>(arr
,arr1
?): readonlyT
[]
Defined in: packages/utils/dist/src/arrays.d.ts:13
Concat and unique the items in the array Any non-array value will be converted to an array
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
arr | readonly T [] |
arr1 ? | readonly T [] |
Returns
readonly T
[]
Call Signature
concat<
T
>(arr
,arr1
?): readonlyT
[]
Defined in: packages/utils/dist/src/arrays.d.ts:14
Concat and unique the items in the array Any non-array value will be converted to an array
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
arr | readonly T [] |
arr1 ? | T | T [] |
Returns
readonly T
[]
configurable()
configurable(
value
): (target
,propertyKey
,descriptor
) =>void
Defined in: packages/utils/dist/src/decorators.d.ts:4
A decorator making changing the changing configurable property
Parameters
Parameter | Type |
---|---|
value | boolean |
Returns
Function
Parameters
Parameter | Type |
---|---|
target | unknown |
propertyKey | string |
descriptor | PropertyDescriptor |
Returns
void
contains()
contains(
input
,substring
):input is string
Defined in: packages/utils/dist/src/strings.d.ts:245
Check whether a string includes another string
Parameters
Parameter | Type |
---|---|
input | unknown |
substring | string |
Returns
input is string
containsFP()
containsFP(
substring
): (input
) =>input is string
Defined in: packages/utils/dist/src/strings.d.ts:249
A function version of contains
Parameters
Parameter | Type |
---|---|
substring | string |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is string
debugLogger()
debugLogger(
testName
,param
?,otherName
?):Logger
Defined in: packages/utils/dist/src/logger.d.ts:16
Parameters
Parameter | Type |
---|---|
testName | string |
param ? | DebugParam |
otherName ? | string |
Returns
endsWith()
endsWith(
str
,val
):boolean
Defined in: packages/utils/dist/src/strings.d.ts:64
A native implementation of lodash endsWith
Parameters
Parameter | Type |
---|---|
str | unknown |
val | unknown |
Returns
boolean
endsWithFP()
endsWithFP(
val
): (input
) =>boolean
Defined in: packages/utils/dist/src/strings.d.ts:66
A function version of startsWith
Parameters
Parameter | Type |
---|---|
val | string |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
ensureBuffer()
ensureBuffer(
input
,encoding
?):Buffer
Defined in: packages/utils/dist/src/buffers.d.ts:4
Convert an input to a Buffer if possible
Parameters
Parameter | Type |
---|---|
input | string | Buffer <ArrayBufferLike > |
encoding ? | BufferEncoding |
Returns
Buffer
enumerable()
enumerable(
enabled
?): (target
,propertyKey
,descriptor
) =>void
Defined in: packages/utils/dist/src/decorators.d.ts:6
A decorator for making a method enumerable or none-enumerable
Parameters
Parameter | Type |
---|---|
enabled ? | boolean |
Returns
Function
Parameters
Parameter | Type |
---|---|
target | unknown |
propertyKey | string |
descriptor | PropertyDescriptor |
Returns
void
escapeString()
escapeString(
input
):string
Defined in: packages/utils/dist/src/deps.d.ts:28
Escape characters in string and avoid double escaping
Parameters
Parameter | Type |
---|---|
input | string | number |
Returns
string
extractMappedIPv4()
extractMappedIPv4(
input
):string
Defined in: packages/utils/dist/src/ip.d.ts:9
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
string
fastAssign()
fastAssign<
T
,U
>(target
,source
):T
&U
Defined in: packages/utils/dist/src/objects.d.ts:29
Perform a shallow clone of an object to another, in the fastest way possible
Type Parameters
Type Parameter |
---|
T extends object |
U extends object |
Parameters
Parameter | Type |
---|---|
target | T |
source | U |
Returns
T
& U
fastCloneDeep()
fastCloneDeep<
T
>(input
):T
Defined in: packages/utils/dist/src/objects.d.ts:27
A clone deep using JSON.parse(JSON.stringify(input))
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
input | T |
Returns
T
filterObject()
filterObject<
T
,I
,E
>(data
,by
?):FilteredResult
<T
,I
,E
>
Defined in: packages/utils/dist/src/objects.d.ts:43
Filters the keys of an object, by list of included key and excluded
Type Parameters
Type Parameter |
---|
T extends object |
I extends string | number | symbol |
E extends string | number | symbol |
Parameters
Parameter | Type |
---|---|
data | T |
by ? | { excludes : E []; includes : I []; } |
by.excludes ? | E [] |
by.includes ? | I [] |
Returns
FilteredResult
<T
, I
, E
>
firstToLower()
firstToLower(
str
):string
Defined in: packages/utils/dist/src/strings.d.ts:232
Change first character in string to lower case
Parameters
Parameter | Type |
---|---|
str | string |
Returns
string
firstToUpper()
firstToUpper(
str
):string
Defined in: packages/utils/dist/src/strings.d.ts:230
Change first character in string to upper case
Parameters
Parameter | Type |
---|---|
str | string |
Returns
string
flatten()
flatten<
T
>(val
):T
[]
Defined in: packages/utils/dist/src/arrays.d.ts:4
A native implementation of lodash flatten
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
val | Many <T []> |
Returns
T
[]
flattenDeep()
flattenDeep<
T
>(val
):T
[]
Defined in: packages/utils/dist/src/arrays.d.ts:5
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
val | ListOfRecursiveArraysOrValues <T > |
Returns
T
[]
formatDateValue()
formatDateValue(
value
,format
):string
|number
Defined in: packages/utils/dist/src/dates.d.ts:88
Format the parsed date value
Parameters
Parameter | Type |
---|---|
value | number | Date | DateTuple |
format | undefined | string |
Returns
string
| number
formatRegex()
formatRegex(
input
,flags
?):RegExp
Defined in: packages/utils/dist/src/regex.d.ts:4
Parameters
Parameter | Type |
---|---|
input | string | RegExp |
flags ? | RegexFlag [] |
Returns
RegExp
geoContains()
geoContains(
firstGeoEntity
,secondGeoEntity
):boolean
Defined in: packages/utils/dist/src/geo.d.ts:35
Returns true if the second geometry is completely contained by the first geometry. The interiors of both geometries must intersect and, the interior and boundary of the secondary geometry must not intersect the exterior of the first geometry.
Parameters
Parameter | Type |
---|---|
firstGeoEntity | GeoInput |
secondGeoEntity | GeoInput |
Returns
boolean
geoContainsFP()
geoContainsFP(
queryGeoEntity
): (input
) =>boolean
Defined in: packages/utils/dist/src/geo.d.ts:40
When provided with geoInput that acts as the argument geo-feature, it will return a function that accepts any geoInput and checks to see if the new input contains the argument geo-feature
Parameters
Parameter | Type |
---|---|
queryGeoEntity | GeoInput |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
geoDisjoint()
geoDisjoint(
firstGeoEntity
,secondGeoEntity
):boolean
Defined in: packages/utils/dist/src/geo.d.ts:59
Returns true if both geo entities have no overlap
Parameters
Parameter | Type |
---|---|
firstGeoEntity | GeoInput |
secondGeoEntity | GeoInput |
Returns
boolean
geoDisjointFP()
geoDisjointFP(
queryGeoEntity
): (input
) =>boolean
Defined in: packages/utils/dist/src/geo.d.ts:57
Parameters
Parameter | Type |
---|---|
queryGeoEntity | GeoInput |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
geoIntersects()
geoIntersects(
firstGeoEntity
,secondGeoEntity
):boolean
Defined in: packages/utils/dist/src/geo.d.ts:55
Returns true if both geo entities intersect each other, if one of the input geo entity is a point, it will check if the other geo-entity contains the point
Parameters
Parameter | Type |
---|---|
firstGeoEntity | GeoInput |
secondGeoEntity | GeoInput |
Returns
boolean
geoIntersectsFP()
geoIntersectsFP(
queryGeoEntity
): (input
) =>boolean
Defined in: packages/utils/dist/src/geo.d.ts:56
Parameters
Parameter | Type |
---|---|
queryGeoEntity | GeoInput |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
geoPointWithinRange()
geoPointWithinRange(
startingPoint
,distanceValue
,point
):boolean
Defined in: packages/utils/dist/src/geo.d.ts:23
Parameters
Parameter | Type |
---|---|
startingPoint | GeoPointInput |
distanceValue | string |
point | GeoPointInput |
Returns
boolean
geoPointWithinRangeFP()
geoPointWithinRangeFP(
startingPoint
,distanceValue
): (input
) =>boolean
Defined in: packages/utils/dist/src/geo.d.ts:24
Parameters
Parameter | Type |
---|---|
startingPoint | GeoPointInput |
distanceValue | string |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
geoPolyHasPoint()
geoPolyHasPoint<
G
>(polygon
): (fieldData
) =>boolean
Defined in: packages/utils/dist/src/geo.d.ts:21
Type Parameters
Type Parameter |
---|
G extends Polygon | MultiPolygon |
Parameters
Parameter | Type |
---|---|
polygon | G | Feature <G , GeoJsonProperties > |
Returns
Function
Parameters
Parameter | Type |
---|---|
fieldData | unknown |
Returns
boolean
geoRelationFP()
geoRelationFP(
geoShape
,relation
): (input
) =>boolean
Defined in: packages/utils/dist/src/geo.d.ts:25
Parameters
Parameter | Type |
---|---|
geoShape | GeoInput |
relation | GeoShapeRelation |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
geoWithin()
geoWithin(
firstGeoEntity
,secondGeoEntity
):boolean
Defined in: packages/utils/dist/src/geo.d.ts:46
Returns true if the first geometry is completely within the second geometry. The interiors of both geometries must intersect and, the interior and boundary of the first geometry must not intersect the exterior of the second geometry
Parameters
Parameter | Type |
---|---|
firstGeoEntity | GeoInput |
secondGeoEntity | GeoInput |
Returns
boolean
geoWithinFP()
geoWithinFP(
queryGeoEntity
): (input
) =>boolean
Defined in: packages/utils/dist/src/geo.d.ts:51
When provided with geoInput that acts as the parent geo-feature, it will return a function that accepts any geoInput and checks to see if the new input is within the parent geo-feature
Parameters
Parameter | Type |
---|---|
queryGeoEntity | GeoInput |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
getBackoffDelay()
getBackoffDelay(
current
,factor
?,max
?,min
?):number
Defined in: packages/utils/dist/src/promises.d.ts:78
Get backoff delay that will safe to retry and is slightly staggered
Parameters
Parameter | Type |
---|---|
current | number |
factor ? | number |
max ? | number |
min ? | number |
Returns
number
getCIDRBroadcast()
getCIDRBroadcast(
input
):string
Defined in: packages/utils/dist/src/ip.d.ts:63
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
string
getCIDRMax()
getCIDRMax(
input
):string
Defined in: packages/utils/dist/src/ip.d.ts:31
Parameters
Parameter | Type | Description |
---|---|---|
input | unknown | ip address block in CIDR notation |
Returns
string
last ip address in the block
Deprecated
use getLastUsableIPInCIDR
getCIDRMin()
getCIDRMin(
input
):string
Defined in: packages/utils/dist/src/ip.d.ts:24
Parameters
Parameter | Type | Description |
---|---|---|
input | unknown | ip address block in CIDR notation |
Returns
string
first IP address in the block
Deprecated
use getFirstUsableIPInCIDR
getCIDRNetwork()
getCIDRNetwork(
input
):string
Defined in: packages/utils/dist/src/ip.d.ts:64
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
string
getDate()
getDate(
input
):number
Defined in: packages/utils/dist/src/dates.d.ts:175
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
getErrorStatusCode()
getErrorStatusCode(
err
,config
?,defaultCode
?):number
Defined in: packages/utils/dist/src/errors.d.ts:132
Parameters
Parameter | Type |
---|---|
err | unknown |
config ? | TSErrorConfig |
defaultCode ? | number |
Returns
number
getField()
Call Signature
getField<
V
>(input
,field
,defaultVal
?):V
Defined in: packages/utils/dist/src/objects.d.ts:54
A type safe get function (will always return the correct type)
IMPORTANT This does not behave like lodash.get, it does not deal with dot notation (nested fields) and it will use the default when dealing with OR statements
Type Parameters
Type Parameter |
---|
V |
Parameters
Parameter | Type |
---|---|
input | undefined |
field | string |
defaultVal ? | V |
Returns
V
Call Signature
getField<
T
,P
>(input
,field
):T
[P
]
Defined in: packages/utils/dist/src/objects.d.ts:55
A type safe get function (will always return the correct type)
IMPORTANT This does not behave like lodash.get, it does not deal with dot notation (nested fields) and it will use the default when dealing with OR statements
Type Parameters
Type Parameter |
---|
T |
P extends string | number | symbol |
Parameters
Parameter | Type |
---|---|
input | T |
field | P |
Returns
T
[P
]
Call Signature
getField<
T
,P
>(input
,field
):T
[P
]
Defined in: packages/utils/dist/src/objects.d.ts:56
A type safe get function (will always return the correct type)
IMPORTANT This does not behave like lodash.get, it does not deal with dot notation (nested fields) and it will use the default when dealing with OR statements
Type Parameters
Type Parameter |
---|
T |
P extends string | number | symbol |
Parameters
Parameter | Type |
---|---|
input | undefined | T |
field | P |
Returns
T
[P
]
Call Signature
getField<
T
,P
>(input
,field
,defaultVal
):T
[P
]
Defined in: packages/utils/dist/src/objects.d.ts:57
A type safe get function (will always return the correct type)
IMPORTANT This does not behave like lodash.get, it does not deal with dot notation (nested fields) and it will use the default when dealing with OR statements
Type Parameters
Type Parameter |
---|
T |
P extends string | number | symbol |
Parameters
Parameter | Type |
---|---|
input | undefined | T |
field | P |
defaultVal | never [] |
Returns
T
[P
]
Call Signature
getField<
T
,P
,V
>(input
,field
,defaultVal
):V
|T
[P
]
Defined in: packages/utils/dist/src/objects.d.ts:58
A type safe get function (will always return the correct type)
IMPORTANT This does not behave like lodash.get, it does not deal with dot notation (nested fields) and it will use the default when dealing with OR statements
Type Parameters
Type Parameter |
---|
T |
P extends string | number | symbol |
V |
Parameters
Parameter | Type |
---|---|
input | undefined | T |
field | P |
defaultVal | V |
Returns
V
| T
[P
]
Call Signature
getField<
T
,P
,V
>(input
,field
,defaultVal
):T
[P
]
Defined in: packages/utils/dist/src/objects.d.ts:59
A type safe get function (will always return the correct type)
IMPORTANT This does not behave like lodash.get, it does not deal with dot notation (nested fields) and it will use the default when dealing with OR statements
Type Parameters
Type Parameter |
---|
T |
P extends string | number | symbol |
V |
Parameters
Parameter | Type |
---|---|
input | undefined | T |
field | P |
defaultVal | V |
Returns
T
[P
]
getFirst()
getFirst<
T
>(input
):undefined
|T
Defined in: packages/utils/dist/src/arrays.d.ts:41
If the input is an array it will return the first item else if it will return the input
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
input | T | T [] | readonly T [] |
Returns
undefined
| T
getFirstChar()
getFirstChar(
input
):string
Defined in: packages/utils/dist/src/strings.d.ts:233
Parameters
Parameter | Type |
---|---|
input | string |
Returns
string
getFirstIPInCIDR()
getFirstIPInCIDR(
input
):string
Defined in: packages/utils/dist/src/ip.d.ts:37
Parameters
Parameter | Type | Description |
---|---|---|
input | unknown | ip address block in CIDR notation, inclusive |
Returns
string
first IP address in the block
getFirstKey()
getFirstKey<
T
>(input
):undefined
| keyofT
Defined in: packages/utils/dist/src/objects.d.ts:15
Get the first key in an object
Type Parameters
Type Parameter |
---|
T extends object |
Parameters
Parameter | Type |
---|---|
input | T |
Returns
undefined
| keyof T
getFirstUsableIPInCIDR()
getFirstUsableIPInCIDR(
input
):string
Defined in: packages/utils/dist/src/ip.d.ts:49
Parameters
Parameter | Type | Description |
---|---|---|
input | unknown | ip address block in CIDR notation |
Returns
string
first usable ip address of the CIDR block
getFirstValue()
getFirstValue<
T
>(input
):undefined
|T
Defined in: packages/utils/dist/src/objects.d.ts:9
Get the first value in an object
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
input | {} |
Returns
undefined
| T
getFullErrorStack()
getFullErrorStack(
err
):string
Defined in: packages/utils/dist/src/errors.d.ts:88
Use following the chain of caused by stack of an error. Don't use this when logging the error, only when sending it
Parameters
Parameter | Type |
---|---|
err | unknown |
Returns
string
getHashCodeFrom()
getHashCodeFrom(
value
):string
Defined in: packages/utils/dist/src/type-coercion.d.ts:30
Generate a unique hash code from a value, this is not a guarantee but it is close enough for doing groupBys and caching
Parameters
Parameter | Type |
---|---|
value | unknown |
Returns
string
getHours()
getHours(
input
):number
Defined in: packages/utils/dist/src/dates.d.ts:173
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
getLast()
getLast<
T
>(input
):undefined
|T
Defined in: packages/utils/dist/src/arrays.d.ts:46
If the input is an array it will return the first item else if it will return the input
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
input | T | T [] | readonly T [] |
Returns
undefined
| T
getLastIPInCIDR()
getLastIPInCIDR(
input
):string
Defined in: packages/utils/dist/src/ip.d.ts:43
Parameters
Parameter | Type | Description |
---|---|---|
input | unknown | ip address block in CIDR notation |
Returns
string
last ip address in the block, inclusive
getLastUsableIPInCIDR()
getLastUsableIPInCIDR(
input
):string
Defined in: packages/utils/dist/src/ip.d.ts:55
Parameters
Parameter | Type | Description |
---|---|---|
input | unknown | ip address block in CIDR notation |
Returns
string
last usable ip address of the CIDR block
getMilliseconds()
getMilliseconds(
input
):number
Defined in: packages/utils/dist/src/dates.d.ts:168
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
getMinutes()
getMinutes(
input
):number
Defined in: packages/utils/dist/src/dates.d.ts:171
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
getMonth()
getMonth(
input
):number
Defined in: packages/utils/dist/src/dates.d.ts:177
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
getSeconds()
getSeconds(
input
):number
Defined in: packages/utils/dist/src/dates.d.ts:169
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
getTime()
getTime(
val
?):number
|false
Defined in: packages/utils/dist/src/dates.d.ts:36
Ensure unix time
Parameters
Parameter | Type |
---|---|
val ? | DateInputTypes |
Returns
number
| false
getTimeBetween()
getTimeBetween(
input
,args
):string
|number
Defined in: packages/utils/dist/src/dates.d.ts:108
Parameters
Parameter | Type |
---|---|
input | unknown |
args | GetTimeBetweenArgs |
Returns
string
| number
getTimeBetweenFP()
getTimeBetweenFP(
args
): (input
) =>string
|number
Defined in: packages/utils/dist/src/dates.d.ts:112
A functional version of getTimeBetween
Parameters
Parameter | Type |
---|---|
args | GetTimeBetweenArgs |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
string
| number
getTimezoneOffset()
getTimezoneOffset(
input
,timezone
):number
Defined in: packages/utils/dist/src/dates.d.ts:155
Given a date and timezone, it will return the offset from UTC in minutes. This is more accurate than timezoneToOffset as it can better account for day lights saving time
Parameters
Parameter | Type |
---|---|
input | unknown |
timezone | string |
Returns
number
getTimezoneOffsetFP()
getTimezoneOffsetFP(
timezone
): (input
) =>number
Defined in: packages/utils/dist/src/dates.d.ts:160
Given a timezone, it will return a function that will take in dates that will be converted the offset in minutes. This is more accurate than timezoneToOffset as it can better account for day lights saving time
Parameters
Parameter | Type |
---|---|
timezone | string |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
getTypeOf()
getTypeOf(
val
):string
Defined in: packages/utils/dist/src/deps.d.ts:26
Determine the type of an input
Parameters
Parameter | Type |
---|---|
val | any |
Returns
string
a human friendly string that describes the input
getUnixTime()
getUnixTime(
val
?):number
|false
Defined in: packages/utils/dist/src/dates.d.ts:37
Parameters
Parameter | Type |
---|---|
val ? | DateInputTypes |
Returns
number
| false
getUTCDate()
getUTCDate(
input
):number
Defined in: packages/utils/dist/src/dates.d.ts:174
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
getUTCHours()
getUTCHours(
input
):number
Defined in: packages/utils/dist/src/dates.d.ts:172
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
getUTCMinutes()
getUTCMinutes(
input
):number
Defined in: packages/utils/dist/src/dates.d.ts:170
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
getUTCMonth()
getUTCMonth(
input
):number
Defined in: packages/utils/dist/src/dates.d.ts:176
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
getUTCYear()
getUTCYear(
input
):number
Defined in: packages/utils/dist/src/dates.d.ts:178
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
getValidDate()
getValidDate(
val
,relativeNow
?):false
|Date
Defined in: packages/utils/dist/src/dates.d.ts:14
Coerces value into a valid date, returns false if it is invalid. Has added support for converting from date math (i.e. now+1h, now-1m, now+2d/y, 2021-01-01||+2d)
Parameters
Parameter | Type |
---|---|
val | unknown |
relativeNow ? | Date |
Returns
false
| Date
getValidDateOrNumberOrThrow()
getValidDateOrNumberOrThrow(
val
):number
|Date
Defined in: packages/utils/dist/src/dates.d.ts:33
Returns a valid date or throws, {@see getValidDate}
Parameters
Parameter | Type |
---|---|
val | unknown |
Returns
number
| Date
getValidDateOrThrow()
getValidDateOrThrow(
val
):Date
Defined in: packages/utils/dist/src/dates.d.ts:18
Returns a valid date or throws, {@see getValidDate}
Parameters
Parameter | Type |
---|---|
val | unknown |
Returns
Date
getValidDateWithTimezone()
getValidDateWithTimezone(
val
,getUTC
?):false
|Date
Defined in: packages/utils/dist/src/dates.d.ts:29
Returns a valid date with the timezone applied {@see getValidDate}
Parameters
Parameter | Type |
---|---|
val | unknown |
getUTC ? | boolean |
Returns
false
| Date
getValidDateWithTimezoneOrThrow()
getValidDateWithTimezoneOrThrow(
val
,getUTC
?):Date
Defined in: packages/utils/dist/src/dates.d.ts:25
Returns a valid date with the timezone applied or throws{@see getValidDate}
Parameters
Parameter | Type |
---|---|
val | unknown |
getUTC ? | boolean |
Returns
Date
getWordParts()
getWordParts(
input
):string
[]
Defined in: packages/utils/dist/src/strings.d.ts:215
Split a string and get the word parts
Parameters
Parameter | Type |
---|---|
input | string |
Returns
string
[]
getYear()
getYear(
input
):number
Defined in: packages/utils/dist/src/dates.d.ts:179
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
hasOwn()
hasOwn(
obj
,prop
):boolean
Defined in: packages/utils/dist/src/objects.d.ts:64
Check if a object has property (and not included in the prototype) Different from has since it doesn't deal with dot notation values.
Parameters
Parameter | Type |
---|---|
obj | any |
prop | string | number | symbol |
Returns
boolean
includes()
includes(
input
,key
):boolean
Defined in: packages/utils/dist/src/arrays.d.ts:36
Safely check if an array, object, map, set has a key
Parameters
Parameter | Type |
---|---|
input | unknown |
key | string |
Returns
boolean
inGeoBoundingBox()
inGeoBoundingBox(
top_left
,bottom_right
,point
):boolean
Defined in: packages/utils/dist/src/geo.d.ts:18
Parameters
Parameter | Type |
---|---|
top_left | GeoPointInput |
bottom_right | GeoPointInput |
point | GeoPointInput |
Returns
boolean
inGeoBoundingBoxFP()
inGeoBoundingBoxFP(
top_left
,bottom_right
): (input
) =>boolean
Defined in: packages/utils/dist/src/geo.d.ts:19
Parameters
Parameter | Type |
---|---|
top_left | GeoPointInput |
bottom_right | GeoPointInput |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
inIPRange()
inIPRange(
input
,args
):boolean
Defined in: packages/utils/dist/src/ip.d.ts:10
Parameters
Parameter | Type |
---|---|
input | unknown |
args | { cidr : string ; max : string ; min : string ; } |
args.cidr ? | string |
args.max ? | string |
args.min ? | string |
Returns
boolean
inNumberRange()
inNumberRange(
input
,args
):input is number
Defined in: packages/utils/dist/src/numbers.d.ts:55
Returns true if number is between min or max value provided
Parameters
Parameter | Type |
---|---|
input | unknown |
args | InNumberRangeArg |
Returns
input is number
Example
inNumberRange(42, { min: 0, max: 100}); // true
inNumberRange(-42, { min:0 , max: 100 }); // false
inNumberRange(42, { min: 0, max: 42 }); // false
inNumberRange(42, { min: 0, max: 42, inclusive: true }) // true
inNumberRangeFP()
inNumberRangeFP(
args
): (input
) =>input is number
Defined in: packages/utils/dist/src/numbers.d.ts:56
Parameters
Parameter | Type |
---|---|
args | InNumberRangeArg |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is number
intToIP()
intToIP(
input
,ipVersion
):string
Defined in: packages/utils/dist/src/ip.d.ts:68
Parameters
Parameter | Type |
---|---|
input | unknown |
ipVersion | string | number |
Returns
string
ipToInt()
ipToInt(
input
):bigint
Defined in: packages/utils/dist/src/ip.d.ts:67
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
bigint
isAfter()
isAfter(
input
,date
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:145
Parameters
Parameter | Type |
---|---|
input | unknown |
date | DateInputTypes |
Returns
boolean
isAlpha()
isAlpha(
input
,locale
?):boolean
Defined in: packages/utils/dist/src/strings.d.ts:255
Parameters
Parameter | Type |
---|---|
input | unknown |
locale ? | AlphaLocale |
Returns
boolean
isAlphaNumeric()
isAlphaNumeric(
input
,locale
?):boolean
Defined in: packages/utils/dist/src/strings.d.ts:256
Parameters
Parameter | Type |
---|---|
input | unknown |
locale ? | AlphanumericLocale |
Returns
boolean
isArray()
isArray<
T
>(input
):input is T
Defined in: packages/utils/dist/src/arrays.d.ts:50
Check if an input is an array, just Array.isArray
Type Parameters
Type Parameter | Default type |
---|---|
T | any [] |
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is T
isArrayLike()
isArrayLike<
T
>(input
):input is T
Defined in: packages/utils/dist/src/arrays.d.ts:59
Check if an input is an TypedArray or Array instance
Type Parameters
Type Parameter | Default type |
---|---|
T | any [] |
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is T
isAsyncIterator()
isAsyncIterator<
T
>(input
):input is AsyncIterable<T, any, any>
Defined in: packages/utils/dist/src/iterators.d.ts:8
Returns true if the input is an async iterator
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is AsyncIterable<T, any, any>
isBase64()
isBase64(
input
):boolean
Defined in: packages/utils/dist/src/strings.d.ts:250
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isBefore()
isBefore(
input
,date
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:144
Parameters
Parameter | Type |
---|---|
input | unknown |
date | DateInputTypes |
Returns
boolean
isBetween()
isBetween(
input
,args
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:146
Parameters
Parameter | Type |
---|---|
input | unknown |
args | { end : DateInputTypes ; start : DateInputTypes ; } |
args.end | DateInputTypes |
args.start | DateInputTypes |
Returns
boolean
isBigInt()
isBigInt(
input
):input is bigint
Defined in: packages/utils/dist/src/numbers.d.ts:11
Check if value is a bigint
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is bigint
isBoolean()
isBoolean(
input
):input is boolean
Defined in: packages/utils/dist/src/booleans.d.ts:27
Returns true if the input is a boolean
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is boolean
isBooleanLike()
isBooleanLike(
input
):boolean
Defined in: packages/utils/dist/src/booleans.d.ts:41
Returns true if the input is like a boolean. Use toBoolean to convert it to one.
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
Example
isBooleanLike(); // false
isBooleanLike(null); // true
isBooleanLike(0); // true
isBooleanLike('0'); // true
isBooleanLike('false'); // true
isBooleanLike('no'); // true
isBuffer()
isBuffer(
input
):input is Buffer<ArrayBufferLike>
Defined in: packages/utils/dist/src/buffers.d.ts:8
Check if an input is an nodejs Buffer
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is Buffer<ArrayBufferLike>
isCIDR()
isCIDR(
input
):input is string
Defined in: packages/utils/dist/src/ip.d.ts:17
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is string
isCountryCode()
isCountryCode(
input
):boolean
Defined in: packages/utils/dist/src/strings.d.ts:252
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isDateTuple()
isDateTuple(
input
):input is DateTuple
Defined in: packages/utils/dist/src/dates.d.ts:66
Verify if an input is a Date Tuple
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is DateTuple
isDeepEqual()
Call Signature
isDeepEqual<
T
>(target
,input
):input is T
Defined in: packages/utils/dist/src/equality.d.ts:33
Compares two values and returns a boolean if they are the same. Arrays are compared using original sorting, while object key ordering doesn't matter.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
target | T |
input | unknown |
Returns
input is T
Example
isDeepEqual({ key1: 1, key2: 2 }, { key2: 2, key1: 1 }) === true;
isDeepEqual(null, null) === true;
isDeepEqual(undefined, undefined) === true;
isDeepEqual(NaN, NaN) === true;
isDeepEqual(3, 3) === true
isDeepEqual('hello', 'hello') === true
isDeepEqual([1, 2, 3], [1, 2, 3]) === true
isDeepEqual([{ some: 'obj' }], [{ some: 'obj' }]) === true
isDeepEqual(undefined, null) === false;
isDeepEqual([1, 2, 3], [1, 3, 2]) === false
isDeepEqual([1, 2, 3], [1, 2, undefined, 3]) === false
isDeepEqual(true, 'true') === false;
Call Signature
isDeepEqual<
T
>(target
,input
):boolean
Defined in: packages/utils/dist/src/equality.d.ts:34
Compares two values and returns a boolean if they are the same. Arrays are compared using original sorting, while object key ordering doesn't matter.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
target | T |
input | unknown |
Returns
boolean
Example
isDeepEqual({ key1: 1, key2: 2 }, { key2: 2, key1: 1 }) === true;
isDeepEqual(null, null) === true;
isDeepEqual(undefined, undefined) === true;
isDeepEqual(NaN, NaN) === true;
isDeepEqual(3, 3) === true
isDeepEqual('hello', 'hello') === true
isDeepEqual([1, 2, 3], [1, 2, 3]) === true
isDeepEqual([{ some: 'obj' }], [{ some: 'obj' }]) === true
isDeepEqual(undefined, null) === false;
isDeepEqual([1, 2, 3], [1, 3, 2]) === false
isDeepEqual([1, 2, 3], [1, 2, undefined, 3]) === false
isDeepEqual(true, 'true') === false;
isDeepEqualFP()
Call Signature
isDeepEqualFP<
T
>(target
): (input
) =>input is T
Defined in: packages/utils/dist/src/equality.d.ts:38
A functional version of isDeepEqual
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
target | T |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is T
Call Signature
isDeepEqualFP<
T
>(target
): (input
) =>boolean
Defined in: packages/utils/dist/src/equality.d.ts:39
A functional version of isDeepEqual
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
target | T |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isElasticsearchError()
isElasticsearchError(
err
):err is ElasticsearchError
Defined in: packages/utils/dist/src/errors.d.ts:106
Check is a elasticsearch error
Parameters
Parameter | Type |
---|---|
err | unknown |
Returns
err is ElasticsearchError
isEmail()
isEmail(
input
):input is string
Defined in: packages/utils/dist/src/strings.d.ts:234
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is string
isEmpty()
isEmpty<
T
>(val
?):val is undefined
Defined in: packages/utils/dist/src/empty.d.ts:5
Check if an input is empty, similar to lodash.isEmpty
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
val ? | null | T |
Returns
val is undefined
isEqual()
Call Signature
isEqual<
T
>(target
,input
):input is T
Defined in: packages/utils/dist/src/equality.d.ts:6
Verify that two values are the same (uses a reference check). Similar to === except two NaNs is considered the same For deep equality use isDeepEqual
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
target | T |
input | unknown |
Returns
input is T
Call Signature
isEqual<
T
>(target
,input
):boolean
Defined in: packages/utils/dist/src/equality.d.ts:7
Verify that two values are the same (uses a reference check). Similar to === except two NaNs is considered the same For deep equality use isDeepEqual
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
target | T |
input | unknown |
Returns
boolean
isEqualFP()
Call Signature
isEqualFP<
T
>(target
): (input
) =>input is T
Defined in: packages/utils/dist/src/equality.d.ts:11
A functional version of isEqual
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
target | T |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is T
Call Signature
isEqualFP<
T
>(target
): (input
) =>boolean
Defined in: packages/utils/dist/src/equality.d.ts:12
A functional version of isEqual
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
target | T |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isError()
isError(
err
):err is Error
Defined in: packages/utils/dist/src/errors.d.ts:102
Check if an input has an error compatible api
Parameters
Parameter | Type |
---|---|
err | unknown |
Returns
err is Error
isExecutedFile()
isExecutedFile(
url
):boolean
Defined in: packages/utils/dist/src/env.d.ts:5
Parameters
Parameter | Type |
---|---|
url | string |
Returns
boolean
isFalsy()
isFalsy(
input
):boolean
Defined in: packages/utils/dist/src/booleans.d.ts:23
Returns true if the value is a falsy like value
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isFatalError()
isFatalError(
err
):boolean
Defined in: packages/utils/dist/src/errors.d.ts:99
Parameters
Parameter | Type |
---|---|
err | unknown |
Returns
boolean
isFloat()
isFloat(
val
):val is number
Defined in: packages/utils/dist/src/numbers.d.ts:32
Verify the input is a finite number (and float like)
Parameters
Parameter | Type |
---|---|
val | unknown |
Returns
val is number
isFQDN()
isFQDN(
input
):boolean
Defined in: packages/utils/dist/src/strings.d.ts:251
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isFriday()
isFriday(
input
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:118
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isFunction()
isFunction(
input
):input is Function
Defined in: packages/utils/dist/src/functions.d.ts:17
Verify an input is a function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is Function
isFuture()
isFuture(
input
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:122
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isGeoJSON()
isGeoJSON(
input
): input is GeoShape | ESGeoShape
Defined in: packages/utils/dist/src/geo.d.ts:4
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is GeoShape | ESGeoShape
isGeoPoint()
isGeoPoint(
input
):boolean
Defined in: packages/utils/dist/src/geo.d.ts:16
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isGeoShapeMultiPolygon()
isGeoShapeMultiPolygon(
input
):input is GeoShapeMultiPolygon
Defined in: packages/utils/dist/src/geo.d.ts:7
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is GeoShapeMultiPolygon
isGeoShapePoint()
isGeoShapePoint(
input
):input is GeoShapePoint
Defined in: packages/utils/dist/src/geo.d.ts:5
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is GeoShapePoint
isGeoShapePolygon()
isGeoShapePolygon(
input
):input is GeoShapePolygon
Defined in: packages/utils/dist/src/geo.d.ts:6
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is GeoShapePolygon
isGreaterThan()
isGreaterThan(
value
,other
):boolean
Defined in: packages/utils/dist/src/equality.d.ts:55
Check if a value is greater than another
Parameters
Parameter | Type |
---|---|
value | unknown |
other | unknown |
Returns
boolean
isGreaterThanFP()
isGreaterThanFP(
other
): (value
) =>boolean
Defined in: packages/utils/dist/src/equality.d.ts:59
Check if a value is greater than or equal to another
Parameters
Parameter | Type |
---|---|
other | unknown |
Returns
Function
Parameters
Parameter | Type |
---|---|
value | unknown |
Returns
boolean
isGreaterThanOrEqualTo()
isGreaterThanOrEqualTo(
value
,other
):boolean
Defined in: packages/utils/dist/src/equality.d.ts:47
Check if a value is greater than or equal to another
Parameters
Parameter | Type |
---|---|
value | unknown |
other | unknown |
Returns
boolean
isGreaterThanOrEqualToFP()
isGreaterThanOrEqualToFP(
other
): (value
) =>boolean
Defined in: packages/utils/dist/src/equality.d.ts:51
Check if a value is greater than or equal to another
Parameters
Parameter | Type |
---|---|
other | unknown |
Returns
Function
Parameters
Parameter | Type |
---|---|
value | unknown |
Returns
boolean
isInteger()
isInteger(
val
):val is number
Defined in: packages/utils/dist/src/numbers.d.ts:26
A simplified implementation of lodash isInteger
Parameters
Parameter | Type |
---|---|
val | unknown |
Returns
val is number
isIP()
isIP(
input
):input is string
Defined in: packages/utils/dist/src/ip.d.ts:1
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is string
isIPOrThrow()
isIPOrThrow(
input
):string
Defined in: packages/utils/dist/src/ip.d.ts:5
Will throw if input is not a valid IP
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
string
isIPRangeOrThrow()
isIPRangeOrThrow(
input
):string
Defined in: packages/utils/dist/src/ip.d.ts:3
Will throw if input is not a valid CIDR
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
string
isIPv4()
isIPv4(
input
):boolean
Defined in: packages/utils/dist/src/ip.d.ts:7
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isIPv6()
isIPv6(
input
):boolean
Defined in: packages/utils/dist/src/ip.d.ts:6
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isISDN()
isISDN(
input
,country
?):boolean
Defined in: packages/utils/dist/src/phone-number.d.ts:2
Parameters
Parameter | Type |
---|---|
input | unknown |
country ? | string |
Returns
boolean
isISO8601()
isISO8601(
input
):input is string
Defined in: packages/utils/dist/src/dates.d.ts:49
Checks to see if an input is a ISO 8601 date
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is string
isIterator()
isIterator<
T
>(input
):input is Iterable<T, any, any>
Defined in: packages/utils/dist/src/iterators.d.ts:4
Returns true if the input is an iterator
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is Iterable<T, any, any>
isKey()
isKey<
T
>(O
,k
):k is keyof T
Defined in: packages/utils/dist/src/objects.d.ts:19
Verify that k is a key of object O
Type Parameters
Type Parameter |
---|
T extends object |
Parameters
Parameter | Type |
---|---|
O | T |
k | PropertyKey |
Returns
k is keyof T
isLeapYear()
isLeapYear(
input
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:124
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isLessThan()
isLessThan(
value
,other
):boolean
Defined in: packages/utils/dist/src/equality.d.ts:71
Check if a value is less than another
Parameters
Parameter | Type |
---|---|
value | unknown |
other | unknown |
Returns
boolean
isLessThanFP()
isLessThanFP(
other
): (value
) =>boolean
Defined in: packages/utils/dist/src/equality.d.ts:75
Check if a value is greater than or equal to another
Parameters
Parameter | Type |
---|---|
other | unknown |
Returns
Function
Parameters
Parameter | Type |
---|---|
value | unknown |
Returns
boolean
isLessThanOrEqualTo()
isLessThanOrEqualTo(
value
,other
):boolean
Defined in: packages/utils/dist/src/equality.d.ts:63
Check if a value is less than or equal to another
Parameters
Parameter | Type |
---|---|
value | unknown |
other | unknown |
Returns
boolean
isLessThanOrEqualToFP()
isLessThanOrEqualToFP(
other
): (value
) =>boolean
Defined in: packages/utils/dist/src/equality.d.ts:67
Check if a value is less than or equal to another
Parameters
Parameter | Type |
---|---|
other | unknown |
Returns
Function
Parameters
Parameter | Type |
---|---|
value | unknown |
Returns
boolean
isMACAddress()
isMACAddress(
input
,delimiter
?):input is string
Defined in: packages/utils/dist/src/strings.d.ts:235
Parameters
Parameter | Type |
---|---|
input | unknown |
delimiter ? | MACDelimiter |
Returns
input is string
isMACAddressFP()
isMACAddressFP(
args
?): (input
) =>input is string
Defined in: packages/utils/dist/src/strings.d.ts:239
A functional version of isMacAddress
Parameters
Parameter | Type |
---|---|
args ? | MACDelimiter |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is string
isMappedIPv4()
isMappedIPv4(
input
):boolean
Defined in: packages/utils/dist/src/ip.d.ts:8
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isMIMEType()
isMIMEType(
input
):boolean
Defined in: packages/utils/dist/src/strings.d.ts:257
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isMonday()
isMonday(
input
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:114
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isNil()
isNil<
T
>(input
):input is Nil
Defined in: packages/utils/dist/src/empty.d.ts:2
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
input | Nil | T |
Returns
input is Nil
isNonRoutableIP()
isNonRoutableIP(
input
):boolean
Defined in: packages/utils/dist/src/ip.d.ts:16
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isNonZeroCidr()
isNonZeroCidr(
input
):boolean
Defined in: packages/utils/dist/src/ip.d.ts:66
Parameters
Parameter | Type |
---|---|
input | string |
Returns
boolean
isNotNil()
isNotNil<
T
>(input
):boolean
Defined in: packages/utils/dist/src/empty.d.ts:3
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
input | T | Nil |
Returns
boolean
isNumber()
isNumber(
input
):input is number
Defined in: packages/utils/dist/src/numbers.d.ts:5
Check if an input is a number
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is number
isNumberLike()
isNumberLike(
input
):boolean
Defined in: packages/utils/dist/src/numbers.d.ts:24
A stricter check for verifying a number string
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
Todo
this needs to be smarter
isObjectEntity()
isObjectEntity(
input
):boolean
Defined in: packages/utils/dist/src/objects.d.ts:23
Verify if the input is a object like type
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isPast()
isPast(
input
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:123
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isPhoneNumberLike()
isPhoneNumberLike(
input
):boolean
Defined in: packages/utils/dist/src/phone-number.d.ts:3
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isPlainObject()
isPlainObject(
input
):boolean
Defined in: packages/utils/dist/src/deps.d.ts:16
Detect if value is a plain object, that is, an object created by the Object constructor or one via Object.create(null)
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isPort()
isPort(
input
):boolean
Defined in: packages/utils/dist/src/strings.d.ts:254
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isPostalCode()
isPostalCode(
input
,locale
?):boolean
Defined in: packages/utils/dist/src/strings.d.ts:253
Parameters
Parameter | Type |
---|---|
input | unknown |
locale ? | "any" | PostalCodeLocale |
Returns
boolean
isPrimitiveValue()
isPrimitiveValue(
value
):boolean
Defined in: packages/utils/dist/src/strings.d.ts:20
Check if a value is a JavaScript primitive value OR it is object with Symbol.toPrimitive
Parameters
Parameter | Type |
---|---|
value | unknown |
Returns
boolean
isRegExp()
isRegExp(
input
):input is RegExp
Defined in: packages/utils/dist/src/regex.d.ts:1
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is RegExp
isRegExpLike()
isRegExpLike(
input
,strict
?):boolean
Defined in: packages/utils/dist/src/regex.d.ts:2
Parameters
Parameter | Type |
---|---|
input | unknown |
strict ? | boolean |
Returns
boolean
isRetryableError()
isRetryableError(
err
):boolean
Defined in: packages/utils/dist/src/errors.d.ts:100
Parameters
Parameter | Type |
---|---|
err | unknown |
Returns
boolean
isRoutableIP()
isRoutableIP(
input
):boolean
Defined in: packages/utils/dist/src/ip.d.ts:15
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isSame()
Deprecated
use isDeepEqual instead
Call Signature
isSame<
T
>(target
,input
):input is T
Defined in: packages/utils/dist/src/equality.d.ts:43
Compares two values and returns a boolean if they are the same. Arrays are compared using original sorting, while object key ordering doesn't matter.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
target | T |
input | unknown |
Returns
input is T
Deprecated
use isDeepEqual instead
Example
isDeepEqual({ key1: 1, key2: 2 }, { key2: 2, key1: 1 }) === true;
isDeepEqual(null, null) === true;
isDeepEqual(undefined, undefined) === true;
isDeepEqual(NaN, NaN) === true;
isDeepEqual(3, 3) === true
isDeepEqual('hello', 'hello') === true
isDeepEqual([1, 2, 3], [1, 2, 3]) === true
isDeepEqual([{ some: 'obj' }], [{ some: 'obj' }]) === true
isDeepEqual(undefined, null) === false;
isDeepEqual([1, 2, 3], [1, 3, 2]) === false
isDeepEqual([1, 2, 3], [1, 2, undefined, 3]) === false
isDeepEqual(true, 'true') === false;
Call Signature
isSame<
T
>(target
,input
):boolean
Defined in: packages/utils/dist/src/equality.d.ts:43
Compares two values and returns a boolean if they are the same. Arrays are compared using original sorting, while object key ordering doesn't matter.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
target | T |
input | unknown |
Returns
boolean
Deprecated
use isDeepEqual instead
Example
isDeepEqual({ key1: 1, key2: 2 }, { key2: 2, key1: 1 }) === true;
isDeepEqual(null, null) === true;
isDeepEqual(undefined, undefined) === true;
isDeepEqual(NaN, NaN) === true;
isDeepEqual(3, 3) === true
isDeepEqual('hello', 'hello') === true
isDeepEqual([1, 2, 3], [1, 2, 3]) === true
isDeepEqual([{ some: 'obj' }], [{ some: 'obj' }]) === true
isDeepEqual(undefined, null) === false;
isDeepEqual([1, 2, 3], [1, 3, 2]) === false
isDeepEqual([1, 2, 3], [1, 2, undefined, 3]) === false
isDeepEqual(true, 'true') === false;
isSaturday()
isSaturday(
input
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:119
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isSimpleObject()
isSimpleObject(
input
):input is Record<string, unknown>
Defined in: packages/utils/dist/src/objects.d.ts:5
Similar to is-plain-object but works better when you cloneDeep a DataEntity
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is Record<string, unknown>
isString()
isString(
val
):val is string
Defined in: packages/utils/dist/src/strings.d.ts:3
A simplified implementation of lodash isString
Parameters
Parameter | Type |
---|---|
val | unknown |
Returns
val is string
isSunday()
isSunday(
input
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:113
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isThursday()
isThursday(
input
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:117
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isToday()
isToday(
input
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:126
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isTomorrow()
isTomorrow(
input
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:125
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isTruthy()
isTruthy(
input
):boolean
Defined in: packages/utils/dist/src/booleans.d.ts:19
Returns true if the value is a truthy like value
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isTSError()
isTSError(
err
):err is TSError
Defined in: packages/utils/dist/src/errors.d.ts:104
Check is a TSError
Parameters
Parameter | Type |
---|---|
err | unknown |
Returns
err is TSError
isTuesday()
isTuesday(
input
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:115
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isTypedArray()
isTypedArray<
T
>(input
):input is T
Defined in: packages/utils/dist/src/arrays.d.ts:55
Check if an input is an TypedArray instance like: Uint8Array or Uint16Array. This excludes nodejs Buffers since they aren't really the same.
Type Parameters
Type Parameter | Default type |
---|---|
T | TypedArray |
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is T
isUnixTime()
isUnixTime(
input
,allowBefore1970
?):input is number
Defined in: packages/utils/dist/src/dates.d.ts:41
Checks to see if an input is a unix time
Parameters
Parameter | Type |
---|---|
input | unknown |
allowBefore1970 ? | boolean |
Returns
input is number
isUnixTimeFP()
isUnixTimeFP(
allowBefore1970
?): (input
) =>input is number
Defined in: packages/utils/dist/src/dates.d.ts:45
A functional version of isUnixTime
Parameters
Parameter | Type |
---|---|
allowBefore1970 ? | boolean |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
input is number
isURL()
isURL(
input
):boolean
Defined in: packages/utils/dist/src/strings.d.ts:240
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isUUID()
isUUID(
input
):boolean
Defined in: packages/utils/dist/src/strings.d.ts:241
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isValidateNumberType()
isValidateNumberType(
type
): (input
) =>boolean
Defined in: packages/utils/dist/src/numbers.d.ts:85
Parameters
Parameter | Type |
---|---|
type | FieldType |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isValidDate()
isValidDate(
val
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:9
A simplified implementation of moment(new Date(val)).isValid()
Parameters
Parameter | Type |
---|---|
val | unknown |
Returns
boolean
isValidDateInstance()
isValidDateInstance(
val
):val is Date
Defined in: packages/utils/dist/src/dates.d.ts:34
Parameters
Parameter | Type |
---|---|
val | unknown |
Returns
val is Date
isWednesday()
isWednesday(
input
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:116
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isWeekday()
isWeekday(
input
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:120
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isWeekend()
isWeekend(
input
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:121
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
isWildCardString()
isWildCardString(
term
):boolean
Defined in: packages/utils/dist/src/regex.d.ts:15
Parameters
Parameter | Type |
---|---|
term | string |
Returns
boolean
isYesterday()
isYesterday(
input
):boolean
Defined in: packages/utils/dist/src/dates.d.ts:127
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
joinList()
joinList(
input
,sep
?,join
?):string
Defined in: packages/utils/dist/src/strings.d.ts:267
Create a sentence from a list (all items will be unique, empty values will be skipped)
Parameters
Parameter | Type |
---|---|
input | JoinListType [] | readonly JoinListType [] |
sep ? | string |
join ? | string |
Returns
string
locked()
locked(): (
target
,propertyKey
,descriptor
) =>void
Defined in: packages/utils/dist/src/decorators.d.ts:2
A decorator for locking down a method
Returns
Function
Parameters
Parameter | Type |
---|---|
target | unknown |
propertyKey | string |
descriptor | PropertyDescriptor |
Returns
void
logError()
logError(
logger
,err
, ...messages
):void
Defined in: packages/utils/dist/src/errors.d.ts:94
Safely log an error (with the error first Logger syntax)
Parameters
Parameter | Type |
---|---|
logger | Logger |
err | unknown |
...messages | any [] |
Returns
void
lookup()
lookup(
input
): (key
) =>any
Defined in: packages/utils/dist/src/objects.d.ts:65
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
Function
Parameters
Parameter | Type |
---|---|
key | unknown |
Returns
any
lookupTimezone()
lookupTimezone(
input
):string
Defined in: packages/utils/dist/src/geo.d.ts:69
Takes in a geo point like entity and returns the timezone of its location
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
string
makeCoordinatesFromGeoPoint()
makeCoordinatesFromGeoPoint(
point
):CoordinateTuple
Defined in: packages/utils/dist/src/geo.d.ts:20
Parameters
Parameter | Type |
---|---|
point | GeoPoint |
Returns
CoordinateTuple
makeGeoBBox()
makeGeoBBox(
point1
,point2
):Feature
<Polygon
,GeoJsonProperties
>
Defined in: packages/utils/dist/src/geo.d.ts:17
Parameters
Parameter | Type |
---|---|
point1 | GeoPoint |
point2 | GeoPoint |
Returns
Feature
<Polygon
, GeoJsonProperties
>
makeGeoCircle()
makeGeoCircle(
point
,distance
,unitVal
?):undefined
|Feature
<Polygon
,GeoJsonProperties
>
Defined in: packages/utils/dist/src/geo.d.ts:22
Parameters
Parameter | Type |
---|---|
point | GeoPoint |
distance | number |
unitVal ? | GeoDistanceUnit |
Returns
undefined
| Feature
<Polygon
, GeoJsonProperties
>
makeGeoFeature()
makeGeoFeature(
geoShape
):undefined
|Feature
<any
,GeoJsonProperties
>
Defined in: packages/utils/dist/src/geo.d.ts:27
Converts a geoJSON object to its turf geo feature counterpart
Parameters
Parameter | Type |
---|---|
geoShape | unknown |
Returns
undefined
| Feature
<any
, GeoJsonProperties
>
makeGeoFeatureOrThrow()
makeGeoFeatureOrThrow(
geoShape
):Feature
<any
>
Defined in: packages/utils/dist/src/geo.d.ts:29
Converts a geoJSON object to its turf geo feature counterpart, will throw if not valid
Parameters
Parameter | Type |
---|---|
geoShape | unknown |
Returns
Feature
<any
>
makeISODate()
makeISODate(
value
?):string
Defined in: packages/utils/dist/src/dates.d.ts:7
A helper function for making an ISODate string
Parameters
Parameter | Type |
---|---|
value ? | null | string | number | Date | DateTuple |
Returns
string
mapKeys()
mapKeys<
T
,R
>(input
,fn
):R
Defined in: packages/utils/dist/src/objects.d.ts:37
Map the keys of an object
Type Parameters
Type Parameter | Default type |
---|---|
T extends object | - |
R | T |
Parameters
Parameter | Type |
---|---|
input | T |
fn | (value , key ) => any |
Returns
R
mapValues()
mapValues<
T
,R
>(input
,fn
):R
Defined in: packages/utils/dist/src/objects.d.ts:35
Map the values of an object
Type Parameters
Type Parameter | Default type |
---|---|
T extends object | - |
R | T |
Parameters
Parameter | Type |
---|---|
input | T |
fn | (value , key ) => any |
Returns
R
match()
match(
regexp
,value
):null
|string
Defined in: packages/utils/dist/src/regex.d.ts:5
Parameters
Parameter | Type |
---|---|
regexp | string | RegExp |
value | string |
Returns
null
| string
matchAll()
matchAll(
regexp
,value
):null
|string
[]
Defined in: packages/utils/dist/src/regex.d.ts:10
Parameters
Parameter | Type |
---|---|
regexp | string | RegExp |
value | string |
Returns
null
| string
[]
matchAllFP()
matchAllFP(
regexp
): (value
) =>null
|string
[]
Defined in: packages/utils/dist/src/regex.d.ts:14
A functional version of matchAll
Parameters
Parameter | Type |
---|---|
regexp | string | RegExp |
Returns
Function
Parameters
Parameter | Type |
---|---|
value | string |
Returns
null
| string
[]
matchFP()
matchFP(
regexp
): (value
) =>null
|string
Defined in: packages/utils/dist/src/regex.d.ts:9
A functional version of match
Parameters
Parameter | Type |
---|---|
regexp | string | RegExp |
Returns
Function
Parameters
Parameter | Type |
---|---|
value | string |
Returns
null
| string
matchWildcard()
matchWildcard(
wildCard
,value
):boolean
Defined in: packages/utils/dist/src/regex.d.ts:17
Parameters
Parameter | Type |
---|---|
wildCard | string |
value | string |
Returns
boolean
md5()
md5(
value
):string
Defined in: packages/utils/dist/src/type-coercion.d.ts:31
Parameters
Parameter | Type |
---|---|
value | string | Buffer <ArrayBufferLike > |
Returns
string
memoize()
memoize<
T
>(fn
):T
Defined in: packages/utils/dist/src/functions.d.ts:15
A replacement for lodash memoize
Type Parameters
Type Parameter |
---|
T extends MemoizeFn |
Parameters
Parameter | Type |
---|---|
fn | T |
Returns
T
multiFieldSort()
Call Signature
multiFieldSort<
T
>(collection
, ...iteratees
):T
[]
Defined in: packages/utils/dist/src/deps.d.ts:9
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
collection | undefined | null | List <T > |
...iteratees | Many <ListIteratee <T >>[] |
Returns
T
[]
Call Signature
multiFieldSort<
T
>(collection
, ...iteratees
):T
[keyofT
][]
Defined in: packages/utils/dist/src/deps.d.ts:10
Type Parameters
Type Parameter |
---|
T extends object |
Parameters
Parameter | Type |
---|---|
collection | undefined | null | T |
...iteratees | Many <ObjectIteratee <T >>[] |
Returns
T
[keyof T
][]
noop()
noop(...
args
):any
Defined in: packages/utils/dist/src/functions.d.ts:10
A simple function that does nothing but return the first argument
Parameters
Parameter | Type |
---|---|
...args | any [] |
Returns
any
not()
not<
T
>(...fns
):T
Defined in: packages/utils/dist/src/fp.d.ts:5
Curry one or more functions, where all must returned falsy values
Type Parameters
Type Parameter |
---|
T extends AnyFn |
Parameters
Parameter | Type |
---|---|
...fns | T [] |
Returns
T
once()
once<
T
>(fn
): (...args
) =>undefined
|ReturnType
<T
>
Defined in: packages/utils/dist/src/functions.d.ts:5
Creates a function that is only invoked once
Type Parameters
Type Parameter |
---|
T extends (...args ) => any |
Parameters
Parameter | Type |
---|---|
fn | T |
Returns
Function
Parameters
Parameter | Type |
---|---|
...args | ArgType <T > |
Returns
undefined
| ReturnType
<T
>
or()
or<
T
>(...fns
):T
Defined in: packages/utils/dist/src/fp.d.ts:13
Curry one or more functions, where one must returned a truthy value
Type Parameters
Type Parameter |
---|
T extends AnyFn |
Parameters
Parameter | Type |
---|---|
...fns | T [] |
Returns
T
parseCustomDateFormat()
parseCustomDateFormat(
value
,format
,referenceDate
):number
Defined in: packages/utils/dist/src/dates.d.ts:79
Parameters
Parameter | Type |
---|---|
value | unknown |
format | string |
referenceDate | Date |
Returns
number
parseDateValue()
parseDateValue(
value
,format
,referenceDate
):number
Defined in: packages/utils/dist/src/dates.d.ts:84
Parse a date value (that has already been validated) and return the epoch millis time.
Parameters
Parameter | Type |
---|---|
value | unknown |
format | undefined | string |
referenceDate | Date |
Returns
number
parseError()
parseError(
input
,withStack
?):string
Defined in: packages/utils/dist/src/errors.d.ts:96
parse input to get error message or stack
Parameters
Parameter | Type |
---|---|
input | unknown |
withStack ? | boolean |
Returns
string
parseErrorInfo()
parseErrorInfo(
input
,config
?):ErrorInfo
Defined in: packages/utils/dist/src/errors.d.ts:90
parse error for info
Parameters
Parameter | Type |
---|---|
input | unknown |
config ? | TSErrorConfig |
Returns
ErrorInfo
parseGeoDistance()
parseGeoDistance(
str
):GeoDistanceObj
Defined in: packages/utils/dist/src/geo.d.ts:8
Parameters
Parameter | Type |
---|---|
str | string |
Returns
GeoDistanceObj
parseGeoDistanceUnit()
parseGeoDistanceUnit(
input
):GeoDistanceUnit
Defined in: packages/utils/dist/src/geo.d.ts:9
Parameters
Parameter | Type |
---|---|
input | string |
Returns
GeoDistanceUnit
parseGeoPoint()
Call Signature
parseGeoPoint(
point
):GeoPoint
Defined in: packages/utils/dist/src/geo.d.ts:13
Convert an input into a Geo Point object with lat and lon
Parameters
Parameter | Type |
---|---|
point | unknown |
Returns
GeoPoint
Call Signature
parseGeoPoint(
point
,throwInvalid
):GeoPoint
Defined in: packages/utils/dist/src/geo.d.ts:14
Convert an input into a Geo Point object with lat and lon
Parameters
Parameter | Type |
---|---|
point | unknown |
throwInvalid | true |
Returns
GeoPoint
Call Signature
parseGeoPoint(
point
,throwInvalid
):null
|GeoPoint
Defined in: packages/utils/dist/src/geo.d.ts:15
Convert an input into a Geo Point object with lat and lon
Parameters
Parameter | Type |
---|---|
point | unknown |
throwInvalid | false |
Returns
null
| GeoPoint
parseJSON()
parseJSON<
T
>(buf
):T
Defined in: packages/utils/dist/src/json.d.ts:3
JSON encoded buffer into a json object
Type Parameters
Type Parameter | Default type |
---|---|
T | Record <string , unknown > |
Parameters
Parameter | Type |
---|---|
buf | string | Buffer <ArrayBufferLike > |
Returns
T
parseList()
parseList(
input
):string
[]
Defined in: packages/utils/dist/src/strings.d.ts:262
Maps an array of strings and and trims the result, or parses a comma separated list and trims the result
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
string
[]
parseNumberList()
parseNumberList(
input
):number
[]
Defined in: packages/utils/dist/src/numbers.d.ts:40
Like parseList, except it returns numbers
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
[]
parsePhoneNumber()
parsePhoneNumber(
input
):string
Defined in: packages/utils/dist/src/phone-number.d.ts:1
Parameters
Parameter | Type |
---|---|
input | string | number |
Returns
string
pDefer()
pDefer():
object
Defined in: packages/utils/dist/src/promises.d.ts:96
An alternative to Bluebird.defer: http://bluebirdjs.com/docs/api/deferred-migration.html Considered bad practice in most cases, use the Promise constructor
Returns
object
promise
promise:
Promise
<any
>
reject()
reject: (
reason
?) =>void
Parameters
Parameter | Type |
---|---|
reason ? | any |
Returns
void
resolve()
resolve: (
value
?) =>void
Parameters
Parameter | Type |
---|---|
value ? | unknown |
Returns
void
pDelay()
pDelay<
T
>(delay
?,arg
?):Promise
<T
>
Defined in: packages/utils/dist/src/promises.d.ts:2
promisified setTimeout
Type Parameters
Type Parameter | Default type |
---|---|
T | undefined |
Parameters
Parameter | Type |
---|---|
delay ? | number |
arg ? | T |
Returns
Promise
<T
>
pImmediate()
pImmediate<
T
>(arg
?):Promise
<T
>
Defined in: packages/utils/dist/src/promises.d.ts:4
promisified process.nextTick,setImmediate or setTimeout depending on your environment
Type Parameters
Type Parameter | Default type |
---|---|
T | undefined |
Parameters
Parameter | Type |
---|---|
arg ? | T |
Returns
Promise
<T
>
polyHasHoles()
polyHasHoles(
input
):boolean
Defined in: packages/utils/dist/src/geo.d.ts:67
Parameters
Parameter | Type |
---|---|
input | GeoShape |
Returns
boolean
pRace()
pRace(
promises
,logError
?):Promise
<any
>
Defined in: packages/utils/dist/src/promises.d.ts:87
Run multiple promises at once, and resolve/reject when the first completes
Parameters
Parameter | Type |
---|---|
promises | Promise <any >[] |
logError ? | (err ) => void |
Returns
Promise
<any
>
pRaceWithTimeout()
pRaceWithTimeout(
promises
,timeout
,logError
?):Promise
<any
>
Defined in: packages/utils/dist/src/promises.d.ts:91
Similar to pRace but with
Parameters
Parameter | Type |
---|---|
promises | Promise <any > | Promise <any >[] |
timeout | number |
logError ? | (err ) => void |
Returns
Promise
<any
>
prefixErrorMsg()
prefixErrorMsg(
input
,prefix
?,defaultMsg
?):string
Defined in: packages/utils/dist/src/errors.d.ts:98
Parameters
Parameter | Type |
---|---|
input | unknown |
prefix ? | string |
defaultMsg ? | string |
Returns
string
pRetry()
pRetry<
T
>(fn
,options
?):Promise
<T
>
Defined in: packages/utils/dist/src/promises.d.ts:53
A promise retry fn.
Type Parameters
Type Parameter | Default type |
---|---|
T | any |
Parameters
Parameter | Type |
---|---|
fn | PromiseFn <T > |
options ? | Partial <PRetryConfig > |
Returns
Promise
<T
>
primitiveToString()
primitiveToString(
value
):string
Defined in: packages/utils/dist/src/strings.d.ts:25
Convert a JavaScript primitive value to a string. (Does not covert object like entities unless Symbol.toPrimitive is specified)
Parameters
Parameter | Type |
---|---|
value | unknown |
Returns
string
pWhile()
pWhile(
fn
,options
?):Promise
<void
>
Defined in: packages/utils/dist/src/promises.d.ts:74
Run a function until it returns true or throws an error
Parameters
Parameter | Type |
---|---|
fn | PromiseFn |
options ? | PWhileOptions |
Returns
Promise
<void
>
random()
random(
min
,max
):number
Defined in: packages/utils/dist/src/numbers.d.ts:3
A native implementation of lodash random
Parameters
Parameter | Type |
---|---|
min | number |
max | number |
Returns
number
reverseIP()
reverseIP(
input
):string
Defined in: packages/utils/dist/src/ip.d.ts:69
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
string
setDate()
setDate(
date
): (input
) =>number
Defined in: packages/utils/dist/src/dates.d.ts:165
Parameters
Parameter | Type |
---|---|
date | number |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
setHours()
setHours(
hours
): (input
) =>number
Defined in: packages/utils/dist/src/dates.d.ts:164
Parameters
Parameter | Type |
---|---|
hours | number |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
setMilliseconds()
setMilliseconds(
ms
): (input
) =>number
Defined in: packages/utils/dist/src/dates.d.ts:161
Parameters
Parameter | Type |
---|---|
ms | number |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
setMinutes()
setMinutes(
minutes
): (input
) =>number
Defined in: packages/utils/dist/src/dates.d.ts:163
Parameters
Parameter | Type |
---|---|
minutes | number |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
setMonth()
setMonth(
month
): (input
) =>number
Defined in: packages/utils/dist/src/dates.d.ts:166
Parameters
Parameter | Type |
---|---|
month | number |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
setPrecision()
setPrecision(
input
,fractionDigits
,truncate
?):number
Defined in: packages/utils/dist/src/numbers.d.ts:63
Returns a truncated number to nth decimal places.
Parameters
Parameter | Type | Description |
---|---|---|
input | unknown | - |
fractionDigits | number | The number of decimal points to round to. |
truncate ? | boolean | If this is true the number will not be rounded |
Returns
number
setPrecisionFP()
setPrecisionFP(
fractionDigits
,truncate
?): (input
) =>number
Defined in: packages/utils/dist/src/numbers.d.ts:70
A functional programming version of setPrecision
Parameters
Parameter | Type | Description |
---|---|---|
fractionDigits | number | The number of decimal points to round to. |
truncate ? | boolean | If this is true the number will not be rounded |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
setSeconds()
setSeconds(
seconds
): (input
) =>number
Defined in: packages/utils/dist/src/dates.d.ts:162
Parameters
Parameter | Type |
---|---|
seconds | number |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
setTimezone()
setTimezone(
input
,timezone
):DateTuple
Defined in: packages/utils/dist/src/dates.d.ts:58
Set the timezone offset of a date, returns a date tuple
Parameters
Parameter | Type |
---|---|
input | unknown |
timezone | string | number |
Returns
DateTuple
setTimezoneFP()
setTimezoneFP(
timezone
): (input
) =>DateTuple
Defined in: packages/utils/dist/src/dates.d.ts:62
A curried version of setTimezone
Parameters
Parameter | Type |
---|---|
timezone | string | number |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
DateTuple
setYear()
setYear(
year
): (input
) =>number
Defined in: packages/utils/dist/src/dates.d.ts:167
Parameters
Parameter | Type |
---|---|
year | number |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
shannonEntropy()
shannonEntropy(
input
):number
Defined in: packages/utils/dist/src/strings.d.ts:270
Performs a Shannon entropy calculation on string inputs
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
shortenIPv6Address()
shortenIPv6Address(
input
):string
Defined in: packages/utils/dist/src/ip.d.ts:62
Parameters
Parameter | Type | Description |
---|---|---|
input | unknown | ip address |
Returns
string
IPv6 addresses are returned without leading 0's in a group or empty groups ipv4 addresses are simply returned
sort()
sort<
T
>(arr
,compare
?):T
[]
Defined in: packages/utils/dist/src/arrays.d.ts:18
Sort an arr or set
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
arr | T [] | readonly T [] | Set <T > |
compare ? | (a , b ) => number |
Returns
T
[]
sortBy()
sortBy<
T
,V
>(arr
,fnOrPath
):T
[]
Defined in: packages/utils/dist/src/arrays.d.ts:20
Sort by path or function that returns the values to sort with
Type Parameters
Type Parameter | Default type |
---|---|
T | - |
V | any |
Parameters
Parameter | Type |
---|---|
arr | T [] | Set <T > |
fnOrPath | string | (value ) => V |
Returns
T
[]
sortKeys()
sortKeys<
T
>(input
,options
?):T
Defined in: packages/utils/dist/src/objects.d.ts:31
Sort keys on an object
Type Parameters
Type Parameter |
---|
T extends Record <string , unknown > |
Parameters
Parameter | Type |
---|---|
input | T |
options ? | { deep : boolean ; } |
options.deep ? | boolean |
Returns
T
startsWith()
startsWith(
str
,val
):boolean
Defined in: packages/utils/dist/src/strings.d.ts:60
A native implementation of lodash startsWith
Parameters
Parameter | Type |
---|---|
str | unknown |
val | unknown |
Returns
boolean
startsWithFP()
startsWithFP(
val
): (input
) =>boolean
Defined in: packages/utils/dist/src/strings.d.ts:62
A function version of startsWith
Parameters
Parameter | Type |
---|---|
val | string |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
stringEntropy()
stringEntropy(
algo
?):StringEntropyFN
Defined in: packages/utils/dist/src/strings.d.ts:277
returns a function to perform entropy calculations, currently only supports the "shannon" algorithm
Parameters
Parameter | Type |
---|---|
algo ? | shannon |
Returns
stripErrorMessage()
stripErrorMessage(
error
,reason
?,requireSafe
?):string
Defined in: packages/utils/dist/src/errors.d.ts:133
Parameters
Parameter | Type |
---|---|
error | unknown |
reason ? | string |
requireSafe ? | boolean |
Returns
string
subtractFromDate()
subtractFromDate(
input
,args
):number
Defined in: packages/utils/dist/src/dates.d.ts:142
Parameters
Parameter | Type |
---|---|
input | unknown |
args | AdjustDateArgs |
Returns
number
subtractFromDateFP()
subtractFromDateFP(
args
): (input
) =>number
Defined in: packages/utils/dist/src/dates.d.ts:143
Parameters
Parameter | Type |
---|---|
args | AdjustDateArgs |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
times()
Call Signature
times(
n
):number
[]
Defined in: packages/utils/dist/src/arrays.d.ts:26
A native implementation of lodash times
Parameters
Parameter | Type |
---|---|
n | number |
Returns
number
[]
Call Signature
times<
T
>(n
,fn
):T
[]
Defined in: packages/utils/dist/src/arrays.d.ts:27
A native implementation of lodash times
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
n | number |
fn | (index ) => T |
Returns
T
[]
timesIter()
Call Signature
timesIter(
n
):Iterable
<number
>
Defined in: packages/utils/dist/src/arrays.d.ts:29
Like times but an iterable
Parameters
Parameter | Type |
---|---|
n | number |
Returns
Iterable
<number
>
Call Signature
timesIter<
T
>(n
,fn
):Iterable
<T
>
Defined in: packages/utils/dist/src/arrays.d.ts:30
Like times but an iterable
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
n | number |
fn | (index ) => T |
Returns
Iterable
<T
>
timezoneToOffset()
timezoneToOffset(
timezone
):number
Defined in: packages/utils/dist/src/dates.d.ts:151
Given a timezone, it will return the minutes of its offset from UTC time
Parameters
Parameter | Type |
---|---|
timezone | unknown |
Returns
number
toBigInt()
toBigInt(
input
):bigint
|false
Defined in: packages/utils/dist/src/numbers.d.ts:13
Convert any input to a bigint
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
bigint
| false
toBigIntOrThrow()
toBigIntOrThrow(
input
):bigint
Defined in: packages/utils/dist/src/numbers.d.ts:15
Convert any input to a bigint
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
bigint
toBoolean()
toBoolean(
input
):boolean
Defined in: packages/utils/dist/src/booleans.d.ts:15
Convert any input into a boolean, this will work with stringified boolean
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
Example
toBoolean(1); // true
toBoolean(0); // false
toBoolean('1'); // true
toBoolean('0'); // false
toBoolean('yes'); // true
toBoolean('NO'); // false
toBoolean('true'); // true
toBoolean('FALSE'); // false
toBooleanOrThrow()
toBooleanOrThrow(
input
):boolean
Defined in: packages/utils/dist/src/booleans.d.ts:43
Will throw if input is not booleanLike, converts input to a Boolean
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
boolean
toCamelCase()
toCamelCase(
input
):string
Defined in: packages/utils/dist/src/strings.d.ts:216
Parameters
Parameter | Type |
---|---|
input | string |
Returns
string
toCelsius()
toCelsius(
input
):number
Defined in: packages/utils/dist/src/numbers.d.ts:75
Convert a fahrenheit value to celsius, this will return a precision of 2 decimal points
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
toCIDR()
toCIDR(
input
,suffix
):string
Defined in: packages/utils/dist/src/ip.d.ts:65
Parameters
Parameter | Type |
---|---|
input | unknown |
suffix | string | number |
Returns
string
toEpochMSOrThrow()
toEpochMSOrThrow(
input
):number
|DateTuple
Defined in: packages/utils/dist/src/dates.d.ts:181
Will convert a date to its epoch millisecond format or throw if invalid
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
| DateTuple
toFahrenheit()
toFahrenheit(
input
):number
Defined in: packages/utils/dist/src/numbers.d.ts:80
Convert a celsius value to fahrenheit, this will return a precision of 2 decimal points
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
toFloat()
toFloat(
input
):number
|false
Defined in: packages/utils/dist/src/numbers.d.ts:34
Convert an input to a float, return false if unable to convert input
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
| false
toFloatOrThrow()
toFloatOrThrow(
input
):number
Defined in: packages/utils/dist/src/numbers.d.ts:36
Convert an input to a float or throw
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
toGeoJSON()
toGeoJSON(
input
):undefined
|GeoShape
Defined in: packages/utils/dist/src/geo.d.ts:64
Only able to convert geo-points to either a geo-json point or a simple polygon. There is no current support for creating polygon with holes or multi-polygon as of right now. geoJSON input is made sure to be properly formatted for its type value
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
undefined
| GeoShape
toGeoJSONOrThrow()
toGeoJSONOrThrow(
input
):GeoShape
Defined in: packages/utils/dist/src/geo.d.ts:65
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
GeoShape
toHumanTime()
toHumanTime(
ms
):string
Defined in: packages/utils/dist/src/dates.d.ts:78
converts smaller than a week milliseconds to human readable time
Parameters
Parameter | Type |
---|---|
ms | number |
Returns
string
toInteger()
toInteger(
input
):number
|false
Defined in: packages/utils/dist/src/numbers.d.ts:28
Convert an input to a integer, return false if unable to convert input
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
| false
toIntegerOrThrow()
toIntegerOrThrow(
input
):number
Defined in: packages/utils/dist/src/numbers.d.ts:30
Convert an input to a integer or throw
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
toISO8601()
toISO8601(
value
):string
Defined in: packages/utils/dist/src/dates.d.ts:54
Convert a value to an ISO 8601 date string. This should be used over makeISODate
Parameters
Parameter | Type |
---|---|
value | unknown |
Returns
string
toJSONCompatibleValue()
toJSONCompatibleValue(
input
):any
Defined in: packages/utils/dist/src/json.d.ts:7
This will try to convert any BigInt values to a value that is compatible with JSON, it will iterate through an array, and check all the keys of an object
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
any
toKebabCase()
toKebabCase(
input
):string
Defined in: packages/utils/dist/src/strings.d.ts:218
Parameters
Parameter | Type |
---|---|
input | string |
Returns
string
toLowerCase()
toLowerCase(
input
):string
Defined in: packages/utils/dist/src/strings.d.ts:56
Converts a value to lower case
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
string
Example
toLowerCase('lowercase'); // 'lowercase'
toLowerCase('MixEd'); // 'mixed'
toLowerCase('UPPERCASE'); // 'uppercase'
toNumber()
toNumber(
input
):number
Defined in: packages/utils/dist/src/numbers.d.ts:7
Convert any input to a number, return Number.NaN if unable to convert input
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
toNumberOrThrow()
toNumberOrThrow(
input
):number
Defined in: packages/utils/dist/src/numbers.d.ts:9
Will throw if converted number is NaN
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
toPascalCase()
toPascalCase(
input
):string
Defined in: packages/utils/dist/src/strings.d.ts:217
Parameters
Parameter | Type |
---|---|
input | string |
Returns
string
toSafeString()
toSafeString(
input
):string
Defined in: packages/utils/dist/src/strings.d.ts:228
Make a string url/elasticsearch safe. safeString converts the string to lower case, removes any invalid characters, and replaces whitespace with _ (if it exists in the string) or - Warning this may reduce the str length
Parameters
Parameter | Type |
---|---|
input | string |
Returns
string
toSnakeCase()
toSnakeCase(
input
):string
Defined in: packages/utils/dist/src/strings.d.ts:219
Parameters
Parameter | Type |
---|---|
input | string |
Returns
string
toStatusErrorCode()
toStatusErrorCode(
input
):string
Defined in: packages/utils/dist/src/errors.d.ts:97
Parameters
Parameter | Type |
---|---|
input | undefined | string |
Returns
string
toString()
toString(
val
):string
Defined in: packages/utils/dist/src/strings.d.ts:15
Safely convert any input to a string
Parameters
Parameter | Type |
---|---|
val | unknown |
Returns
string
Example
toString(1); // '1'
toString(0.01); // '0.01'
toString(true); // 'true'
toString(BigInt(2) ** BigInt(64)); // '18,446,744,073,709,551,616'
toString(new Date('2020-09-23T14:54:21.020Z')) // '2020-09-23T14:54:21.020Z'
toTimeZone()
toTimeZone(
val
,timezone
):null
|DateTuple
Defined in: packages/utils/dist/src/dates.d.ts:19
Parameters
Parameter | Type |
---|---|
val | unknown |
timezone | string |
Returns
null
| DateTuple
toTimeZoneUsingLocation()
toTimeZoneUsingLocation(
val
,location
):null
|DateTuple
Defined in: packages/utils/dist/src/dates.d.ts:20
Parameters
Parameter | Type |
---|---|
val | unknown |
location | unknown |
Returns
null
| DateTuple
toTimeZoneUsingLocationFP()
toTimeZoneUsingLocationFP(
location
): (val
) =>null
|DateTuple
Defined in: packages/utils/dist/src/dates.d.ts:21
Parameters
Parameter | Type |
---|---|
location | unknown |
Returns
Function
Parameters
Parameter | Type |
---|---|
val | unknown |
Returns
null
| DateTuple
toTitleCase()
toTitleCase(
input
):string
Defined in: packages/utils/dist/src/strings.d.ts:220
Parameters
Parameter | Type |
---|---|
input | string |
Returns
string
toUpperCase()
toUpperCase(
input
):string
Defined in: packages/utils/dist/src/strings.d.ts:46
Converts a value to upper case
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
string
Example
toUpperCase('lowercase'); // 'LOWERCASE'
toUpperCase('MixEd'); // 'MIXED'
toUpperCase('UPPERCASE'); // 'UPPERCASE'
trackTimeout()
trackTimeout(
timeoutMs
): () =>number
|false
Defined in: packages/utils/dist/src/dates.d.ts:76
track a timeout to see if it expires
Parameters
Parameter | Type |
---|---|
timeoutMs | number |
Returns
Function
a function that will returns false if the time elapsed
Returns
number
| false
trim()
trim(
input
,char
?):string
Defined in: packages/utils/dist/src/strings.d.ts:27
safely trims whitespace from an input
Parameters
Parameter | Type |
---|---|
input | unknown |
char ? | string |
Returns
string
trimAndToLower()
trimAndToLower(
input
?):string
Defined in: packages/utils/dist/src/strings.d.ts:34
safely trim and to lower a input, useful for string comparison
Parameters
Parameter | Type |
---|---|
input ? | string |
Returns
string
trimAndToUpper()
trimAndToUpper(
input
?):string
Defined in: packages/utils/dist/src/strings.d.ts:36
safely trim and to lower a input, useful for string comparison
Parameters
Parameter | Type |
---|---|
input ? | string |
Returns
string
trimEnd()
trimEnd(
input
,char
?):string
Defined in: packages/utils/dist/src/strings.d.ts:31
Parameters
Parameter | Type |
---|---|
input | unknown |
char ? | string |
Returns
string
trimEndFP()
trimEndFP(
char
?): (input
) =>string
Defined in: packages/utils/dist/src/strings.d.ts:32
Parameters
Parameter | Type |
---|---|
char ? | string |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
string
trimFP()
trimFP(
char
?): (input
) =>string
Defined in: packages/utils/dist/src/strings.d.ts:28
Parameters
Parameter | Type |
---|---|
char ? | string |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
string
trimISODateSegment()
trimISODateSegment(
segment
): (input
) =>number
Defined in: packages/utils/dist/src/dates.d.ts:71
Returns a function to trim the ISO 8601 date segment useful for creating yearly, monthly, daily or hourly dates
Parameters
Parameter | Type |
---|---|
segment | ISO8601DateSegment |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
trimStart()
trimStart(
input
,char
?):string
Defined in: packages/utils/dist/src/strings.d.ts:29
Parameters
Parameter | Type |
---|---|
input | unknown |
char ? | string |
Returns
string
trimStartFP()
trimStartFP(
char
?): (input
) =>string
Defined in: packages/utils/dist/src/strings.d.ts:30
Parameters
Parameter | Type |
---|---|
char ? | string |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
string
truncate()
truncate(
value
,len
,ellipsis
?):string
Defined in: packages/utils/dist/src/strings.d.ts:70
Truncate a string value, by default it will add an ellipsis (...) if truncated.
Parameters
Parameter | Type |
---|---|
value | unknown |
len | number |
ellipsis ? | boolean |
Returns
string
truncateFP()
truncateFP(
len
,ellipsis
?): (value
) =>string
Defined in: packages/utils/dist/src/strings.d.ts:74
A functional version of truncate
Parameters
Parameter | Type |
---|---|
len | number |
ellipsis ? | boolean |
Returns
Function
Parameters
Parameter | Type |
---|---|
value | unknown |
Returns
string
tryParseJSON()
tryParseJSON<
T
>(input
):T
Defined in: packages/utils/dist/src/json.d.ts:1
Type Parameters
Type Parameter | Default type |
---|---|
T | any |
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
T
tzCacheLoaded()
tzCacheLoaded():
boolean
Defined in: packages/utils/dist/src/geo.d.ts:70
Returns
boolean
unescapeString()
unescapeString(
str
?):string
Defined in: packages/utils/dist/src/strings.d.ts:58
Unescape characters in string and avoid double escaping
Parameters
Parameter | Type |
---|---|
str ? | string |
Returns
string
uniq()
uniq<
T
>(arr
):T
[]
Defined in: packages/utils/dist/src/arrays.d.ts:16
A native implementation of lodash uniq
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
arr | T [] | Set <T > |
Returns
T
[]
uniqBy()
uniqBy<
T
,V
>(values
,fnOrPath
):T
[]
Defined in: packages/utils/dist/src/arrays.d.ts:24
Get the unique values by a path or function that returns the unique values
Type Parameters
Type Parameter | Default type |
---|---|
T | - |
V | any |
Parameters
Parameter | Type |
---|---|
values | T [] | readonly T [] |
fnOrPath | string | (value ) => V |
Returns
T
[]
validateByteNumber()
validateByteNumber(
input
):number
Defined in: packages/utils/dist/src/numbers.d.ts:81
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
validateIntegerNumber()
validateIntegerNumber(
input
):number
Defined in: packages/utils/dist/src/numbers.d.ts:83
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
validateListCoords()
validateListCoords(
coords
):any
[]
Defined in: packages/utils/dist/src/geo.d.ts:66
Parameters
Parameter | Type |
---|---|
coords | CoordinateTuple [] |
Returns
any
[]
validateNumberType()
validateNumberType(
type
): (input
) =>number
Defined in: packages/utils/dist/src/numbers.d.ts:84
Parameters
Parameter | Type |
---|---|
type | FieldType |
Returns
Function
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
validateShortNumber()
validateShortNumber(
input
):number
Defined in: packages/utils/dist/src/numbers.d.ts:82
Parameters
Parameter | Type |
---|---|
input | unknown |
Returns
number
waterfall()
waterfall(
input
,fns
,addBreak
?):Promise
<any
>
Defined in: packages/utils/dist/src/promises.d.ts:83
Async waterfall function
Parameters
Parameter | Type |
---|---|
input | unknown |
fns | PromiseFn <any >[] |
addBreak ? | boolean |
Returns
Promise
<any
>
wildCardToRegex()
wildCardToRegex(
term
):RegExp
Defined in: packages/utils/dist/src/regex.d.ts:16
Parameters
Parameter | Type |
---|---|
term | string |
Returns
RegExp
withoutNil()
withoutNil<
T
>(input
):WithoutNil
<T
>
Defined in: packages/utils/dist/src/objects.d.ts:39
Build a new object without null or undefined values (shallow)
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
input | T |
Returns
WithoutNil
<T
>
References
addFormats
Re-exports addFormats
APIConstructor
Re-exports APIConstructor
APICore
Renames and re-exports default
APICoreConstructor
Re-exports APICoreConstructor
APIFactory
Renames and re-exports default
APIFactoryRegistry
Re-exports APIFactoryRegistry
APIModule
Re-exports APIModule
apiSchema
Re-exports apiSchema
ASSET_KEYWORD
Re-exports ASSET_KEYWORD
AssetBundleType
Re-exports AssetBundleType
AssetRepository
Re-exports AssetRepository
AssetRepositoryKey
Re-exports AssetRepositoryKey
AssetsAPI
Re-exports AssetsAPI
BatchProcessor
Renames and re-exports default
BundledAPIOperation
Re-exports BundledAPIOperation
BundledObserverOperation
Re-exports BundledObserverOperation
BundledProcessorOperation
Re-exports BundledProcessorOperation
BundledReaderOperation
Re-exports BundledReaderOperation
CachedClients
Re-exports CachedClients
CollectProcessor
Renames and re-exports default
Context
Re-exports Context
ConvictSchema
Renames and re-exports default
CoreOperation
Re-exports CoreOperation
CrossValidationFn
Re-exports CrossValidationFn
DelayProcessor
Renames and re-exports default
EachProcessor
Renames and re-exports default
EventHandlers
Re-exports EventHandlers
ExecutionContext
Re-exports ExecutionContext
ExecutionContextAPI
Re-exports ExecutionContextAPI
ExecutionContextAPIs
Re-exports ExecutionContextAPIs
ExecutionContextConfig
Re-exports ExecutionContextConfig
ExecutionStats
Re-exports ExecutionStats
Fetcher
Renames and re-exports default
FetcherConstructor
Re-exports FetcherConstructor
FetcherCore
Renames and re-exports default
FilterProcessor
Renames and re-exports default
FindOperationResults
Re-exports FindOperationResults
formats
Re-exports formats
getAssetPath
Re-exports getAssetPath
getClient
Re-exports getClient
GetClientConfig
Re-exports GetClientConfig
getMetric
Re-exports getMetric
getOpConfig
Re-exports getOpConfig
getOperationAPIType
Re-exports getOperationAPIType
isOperationAPI
Re-exports isOperationAPI
isPromAvailable
Re-exports isPromAvailable
isSlicerExecutionContext
Re-exports isSlicerExecutionContext
isWorkerExecutionContext
Re-exports isWorkerExecutionContext
JobAPIInstance
Re-exports JobAPIInstance
JobAPIInstances
Re-exports JobAPIInstances
JobObserver
Renames and re-exports default
JobRunnerAPI
Re-exports JobRunnerAPI
jobSchema
Re-exports jobSchema
JobValidator
Re-exports JobValidator
LoaderOptions
Re-exports LoaderOptions
makeContextLogger
Re-exports makeContextLogger
makeExContextLogger
Re-exports makeExContextLogger
makeExecutionContext
Re-exports makeExecutionContext
makeJobSchema
Re-exports makeJobSchema
MapProcessor
Renames and re-exports default
MetadataFns
Re-exports MetadataFns
MockPromMetrics
Re-exports MockPromMetrics
newTestExecutionConfig
Re-exports newTestExecutionConfig
newTestJobConfig
Re-exports newTestJobConfig
newTestSlice
Re-exports newTestSlice
NoopProcessor
Renames and re-exports default
Observer
Renames and re-exports default
ObserverConstructor
Re-exports ObserverConstructor
OpAPI
Re-exports OpAPI
OpAPIFn
Re-exports OpAPIFn
OpAPIInstance
Re-exports OpAPIInstance
OperationAPI
Renames and re-exports default
OperationAPIConstructor
Re-exports OperationAPIConstructor
OperationAPIType
Re-exports OperationAPIType
OperationCore
Renames and re-exports default
OperationCoreConstructor
Re-exports OperationCoreConstructor
OperationLifeCycle
Re-exports OperationLifeCycle
OperationLoader
Re-exports OperationLoader
OperationLocationType
Re-exports OperationLocationType
OperationModule
Re-exports OperationModule
OperationResults
Re-exports OperationResults
OperationTypeName
Re-exports OperationTypeName
OpRunnerAPI
Re-exports OpRunnerAPI
opSchema
Re-exports opSchema
OpTypeToRepositoryKey
Re-exports OpTypeToRepositoryKey
ParallelSlicer
Renames and re-exports default
ParallelSlicerConstructor
Re-exports ParallelSlicerConstructor
parseName
Re-exports parseName
ParseNameResponse
Re-exports ParseNameResponse
ProcessorConstructor
Re-exports ProcessorConstructor
ProcessorCore
Renames and re-exports default
ProcessorFn
Re-exports ProcessorFn
ProcessorModule
Re-exports ProcessorModule
ReaderFn
Re-exports ReaderFn
ReaderModule
Re-exports ReaderModule
registerApis
Re-exports registerApis
RepositoryOperation
Re-exports RepositoryOperation
RunSliceResult
Re-exports RunSliceResult
SchemaConstructor
Re-exports SchemaConstructor
SchemaCore
Renames and re-exports default
SchemaModule
Re-exports SchemaModule
SelfValidationFn
Re-exports SelfValidationFn
SingleSlicerConstructor
Re-exports SingleSlicerConstructor
sliceAnalyticsMetrics
Re-exports sliceAnalyticsMetrics
Slicer
Renames and re-exports default
SlicerConstructor
Re-exports SlicerConstructor
SlicerCore
Renames and re-exports default
SlicerCoreConstructor
Re-exports SlicerCoreConstructor
SliceResult
Re-exports SliceResult
SlicerExecutionContext
Re-exports SlicerExecutionContext
SlicerFn
Re-exports SlicerFn
SlicerFns
Re-exports SlicerFns
SlicerOperationLifeCycle
Re-exports SlicerOperationLifeCycle
SlicerOperations
Re-exports SlicerOperations
SlicerRecoveryData
Re-exports SlicerRecoveryData
SlicerResult
Re-exports SlicerResult
SliceStatus
Re-exports SliceStatus
TestClientConfig
Re-exports TestClientConfig
TestClients
Re-exports TestClients
TestClientsByEndpoint
Re-exports TestClientsByEndpoint
TestContext
Re-exports TestContext
TestContextApis
Re-exports TestContextApis
TestContextAPIs
Re-exports TestContextAPIs
TestContextOptions
Re-exports TestContextOptions
TestContextType
Re-exports TestContextType
TestReaderFetcher
Renames and re-exports default
TestReaderSlicer
Renames and re-exports default
validateAPIConfig
Re-exports validateAPIConfig
validateJobConfig
Re-exports validateJobConfig
validateOpConfig
Re-exports validateOpConfig
ValidLoaderOptions
Re-exports ValidLoaderOptions
WorkerExecutionContext
Re-exports WorkerExecutionContext
WorkerOperationLifeCycle
Re-exports WorkerOperationLifeCycle
WorkerOperations
Re-exports WorkerOperations
WorkerSliceState
Re-exports WorkerSliceState
WorkerStatus
Re-exports WorkerStatus