0.5.0 • Published 2 years ago
@apextoaster/js-utils v0.5.0
JS Utils
This project is a collection of utilities, collected from my other Typescript projects, lightly documented and heavily tested.
Contents
Status
Releases
Usage
Install:
yarn add -D @apextoaster/js-utils
And import:
import { mustExist } from '@apextoaster/js-utils';
The library is bundled and has no dependencies.
Features
Please see the complete API docs for the full function list.
Features utilities and helpers for:
- Array
- assertions/guards:
hasItems
isArray
for bothArray
/ReadonlyArray
isEmpty
lengthOf
- conversion
filterZip
toArray
- assertions/guards:
- Array Mapper
- array-to-map converter, reduces an array of values to a map, using an array of keys
- Async
- timed promises
defer
/deferValue
deferUntil
timeout
- timed promises
- Buffer
- concatenation
concat
encode
- concatenation
- Checklist
- allow/deny list
- Child Process
childResult
writeInput
- Env Vars
isDebug
- Errors
- nestable, typed error
ChildProcessError
InvalidArgumentError
MissingKeyError
NotFoundError
NotImplementedError
TimeoutError
- nestable, typed error
- Logger
- test logging helpers
- Map
- types
MapLike
- assertions/guards:
mustGet
- null-safe helpers
getOrDefault
- helpers for
Map<K, Array<V>>
getHead
/getHeadOrDefault
setOrPush
- concat/merge
mergeMap
pushMergeMap
- conversion
entriesOf
makeDict
makeMap
pairsToMap
- types
- Math
- predicates for functional methods
sum
- predicates for functional methods
- Maybe
- types
Maybe
None
- assertions/guards
doesExist
mustExist
mustDefault
mustFind
removeNone
- null-safe helpers
isNone
isSome
- types
- Predicate
- types for functional methods
- Reflect
getConstructor
getMethods
- Signal
- wait for OS signal
signal
- wait for OS signal
- String
leftPad
trim
with suffix
0.5.0-1
2 years ago
0.5.0-0
2 years ago
0.5.0
2 years ago
0.4.1
2 years ago
0.4.0
3 years ago
0.3.0
3 years ago
0.4.0-0
3 years ago
0.4.0-1
3 years ago
0.2.1-0
4 years ago
0.2.1
4 years ago
0.2.0-4
4 years ago
0.2.0-3
4 years ago
0.2.0-2
4 years ago
0.2.0-1
4 years ago
0.2.0
4 years ago
0.2.0-0
4 years ago
0.1.8
4 years ago
0.1.7
4 years ago
0.1.6
4 years ago
0.1.5
4 years ago
0.1.4
4 years ago
0.1.1
4 years ago
0.1.3
4 years ago
0.1.0
4 years ago