@resturant-webtool/ts-utils
v10.0.0
Published
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/belgattitude/nextjs-monorepo-example/ci-packages.yml?style=for-the-badge&label=CI)
Downloads
3
Readme
@resturant-webtool/ts-utils
Note This package is part of belgattitude/nextjs-monorepo-example.
A package holding some basic typescript utilities: typeguards, assertions...
- [x] Packaged as ES module (type: module in package.json).
- [x] Can be build with tsup (no need if using tsconfig aliases).
- [x] Simple unit tests demo with either Vitest (
yarn test-unit
) or TS-Jest (yarn test-unit-jest
).
Install
From any package or apps:
yarn add @resturant-webtool/ts-utils@"workspace:^"
Enable aliases
{
//"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "./src",
"paths": {
"@resturant-webtool/ts-utils": ["../../../packages/ts-utils/src/index"],
},
},
}
Consume
import { isPlainObject } from "@resturant-webtool/ts-utils";
isPlainObject(true) === false;