Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

iwannabebot/universal-validator

Repository files navigation

NOTICE: THIS IS A SAMPLE REPOSITORY FOR A BLOG I WROTE ON MEDIUM.

universal-validator

A string validation library for node

Build Status Coverage Status

Installation

npm install universal-validator --save

Usage

Javascript

var validator = require('universal-validator');
console.log(validator.IsNullOrEmpty(' '));
Output should be true

TypeScript

import * as validator from 'universal-validator';
console.log(validator.IsNullOrEmpty('Apple'))
Output should be false