Set of useful TypeScript utilities and helpers.
Via Yarn
yarn add @wavevision/ts-utils
or npm
npm install --save @wavevision/ts-utils
The package contains useful functions for:
- components โ get
displayName
of a React component with fallback for unknown - dom โ create data attributes, get typed elements by various selectors (browser only)
- numbers โ generate numeric IDs, format floats
- strings โ generate random strings, format, capitalize, shallow stringify objects
- type โ type safe checkers
- url โ parse current URL including query string (browser only)