@amomammadw/type-mate
v0.1.1
Published
## Introduction
Downloads
18
Maintainers
Readme
What is TypeMate?
Introduction
TypeMate is a
- Lightweight and batteries included utility helper :fire:
- Typesafe and Easy-to-debug Package :smile:
- Easy to Use with your Framework of choice :toolbox:
When to use
whenever you want to have a condition for a variable type or whenever you want to check if the parameter is a number
, string
, array
or etc...
TypeMate will come to your assistance and make your life easier while coding your next unicorn app :smile:
Getting Started
Installation
The only thing you should do is install the package in your framework of choice
::: code-group
npm install type-mate
yarn add type-mate
pnpm add type-mate
:::
Usage
To use the utility functions you just have to import your desired utility and use it
all utilities are type safe and all type errors are handled precisely :fire:
import { isOdd } from "@amomammadw/type-mate";
console.log(isOdd(42)); // returns false
console.log(isOdd("42")); // Error: Please Enter Numbers Only! // [!code error]
console.log(isOdd(41)); // returns true