An open API service indexing awesome lists of open source software.

https://github.com/uocdev/validatorjs

Simple validation type data with JavaScript
https://github.com/uocdev/validatorjs

Last synced: 10 months ago
JSON representation

Simple validation type data with JavaScript

Awesome Lists containing this project

README

          

# validatorJS
The simple for people who want create validation type data for your application (small / simple)

## Get Started
Clone this repository for your local.
```bash
git clone https://github.com/UocDev/validatorJS.git [YOUR_NAME_DIRECTORY]
```
Install some Package.
```bash
npm init -y
```
```bash
npm install chalk
```

### Example
```js
const { isString, isNumber, isBoolean, isArray } = require('./validator');

isString('Hello, world!'); // ✅ Green
isString(123); // ❌ Red

isNumber(42); // ✅ Green
isNumber('42'); // ❌ Red

isBoolean(true); // ✅ Green
isBoolean('true'); // ❌ Red

isArray([1, 2, 3]); // ✅ Green
isArray('not an array'); // ❌ Red
```
Goodluck developer for your future projects!