@brlt/utils
Opinionated collection of common JavaScript / TypeScript utils, forked from @antfu/utils.
Highlights
- Tree-shakable ES Modules
- Fully typed with TypeScript for first-class IDE integration
- Generic types like
Nullable<T>
,Arrayable<T>
,ElementOf<T>
, etc.
Installation
pnpm add -D @brlt/utils
yarn add -D @brlt/utils
npm i -D @brlt/utils
This package is designed to be added to your
devDependencies
and bundled into your distribution.
Importation
import * as utils from '@brlt/utils'
// export * from './array'
// export * from './base'
// export * from './guards'
// export * from './is'
// export * from './math'
// export * from './string'
// export * from './time'
// export * from './types'
// export * from './function'
// export * from './object'
// export * from './promise'
// export * from './vendor'
// export * from './p'
import * as arr from '@brlt/utils/array'
import * as obj from '@brlt/utils/object'
import * as str from '@brlt/utils/string'
import * as pro from '@brlt/utils/promise'
import { debounce, throttle } from '@brlt/utils/vendor'
Implementation
License
MIT © Nicholas Berlette and Anthony Fu