uft
v0.4.0
Published
A collection of performant, strongly typed utilities to aid your Typescript application.
Downloads
89
Maintainers
Readme
uft
A collection of performant, strongly typed utilities to aid your Typescript application.
Table of contents
Installation
# using npm
npm install uft
# using pnpm
pnpm add uft
Documentation
For an optimal development experience, this library is fully documented with JSDoc comments, including usage examples. If you're using VSCode, simply hover over any method to see its documentation inline, within your editor.
For those who prefer a web-based reference, a documentation site generated with TypeDoc is available here.
Tree Shaking
If you are using this library in a project that has a build step featuring tree shaking (e.g. webpack, rollup, etc.), you can freely import methods from the default entry point:
import { filteredMap, isDefined } from 'uft'
Otherwise, make use of the different export paths to ensure that only the code for used methods is bundled:
import { filteredMap } from 'uft/filteredMap'
import { isDefined } from 'uft/isDefined'
API
Categories
Array
- at
- clearArray
- filteredForEach
- filteredMap
- forMap
- isEmpty
- isNotEmpty
- partition
- removeFirst
- removeLast
- replaceArray
- sortedInsert
- unique
Coerce
Is
- assert
- createAssert
- isDefined
- isUndefined
- isFunction
- isNull
- isNotNull
- isNullish
- isNotNullish
- isNumber
- isObject
- isObjectLoose
- isPlainArray
- isPlainObject
- isSafeInteger
- isSafeNumber
- isString
Object
Misc
Changelog
View the changes made to each version of uft
here.
License
See license.