![Release](https://github.com/alanscodelog/utils/workflows/Release/badge.svg)
A collection of my utility functions and types. Mostly intended for use within my own projects.
Install
npm install @alanscodelog/utils
yarn add @alanscodelog/utils
Usage
There's four types of utility functions available, with some having node only variants:
utils
- the main utility functions
node_utils
- node only utility functions
testing
- functions that are only useful for testing purposesretypes
- existing functions typed as something else (e.g. Object.keys cast to a type that's useful for iterating, etc)types
- all the types used internally + any utility types
- Also includes any enums.
And there's also:
colors
- contains the basic ansi escape codes, for small scripts, or debugging, where I don't need to add chalk.
Some utility functions are browser only, but they are included with the regular functions since they'll just throw when you try to use them (they should not cause errors when just getting imported). The node only ones will though so they must be separated.
import { keys, debounce, colors, ...} from "@alanscodelog/utils"
import { MakeOptional, ...} from "@alanscodelog/utils/types"