concat(chunks) |
|
constructorName(val) |
|
countOf(val) |
Calculate the "length" of an array or value.Arrays return their length, single values return 1, and nil values return 0. This counts the number of elements that setOrPush would add. |
defaultWhen(condition, items) |
|
defer(ms, val) |
Resolve after a set amount of time. |
doesExist(val) |
Check if a variable is not nil. |
encode(chunks, encoding) |
|
entriesOf(map) |
|
filterNil(list) |
Remove any null or undefined items from the list. |
getConstructor(val) |
|
getHead(map, key) |
|
getHeadOrDefault(map, key, defaultValue) |
|
getMethods(value) |
|
getOrDefault(map, key, defaultValue) |
|
getTestLogger(verbose) |
|
isDebug() |
|
isNil(val) |
Check if a value is nil. |
leftPad(val, min, fill) |
|
makeDict(map) |
Turns a map or dict into a dict |
makeMap(val) |
Clone a map or map-like object into a new map. |
mergeList(parts) |
Merge arguments, which may or may not be arrays, into one return that is definitely an array. |
mergeMap(target, source) |
|
mustCoalesce(values) |
Return the first value that is not nil.TODO: rename to mustDefault |
mustExist(val) |
Assert that a variable is not nil and return the value. |
mustFind(list, predicate) |
Find a value matching the given predicate or throw. |
mustGet(map, key) |
Get an element from a Map and guard against nil values. |
normalizeMap(map) |
|
pairsToMap(pairs) |
|
pushMergeMap(args) |
|
removePid(path) |
|
setOrPush(map, key, val) |
Set a map key to a new array or push to the existing value. |
signal(signals) |
|
spyLogger(spies) |
|
timeout(ms, oper) |
Reject after a set amount of time if the original promise has not yet resolved. |
trim(val, max, tail) |
|
waitForChild(child) |
|
writePid(path) |
|
writeValue(stream, value) |
|