A string validation library for node
npm install universal-validator --save
var validator = require('universal-validator');
console.log(validator.IsNullOrEmpty(' '));
Output should be true
import * as validator from 'universal-validator';
console.log(validator.IsNullOrEmpty('Apple'))
Output should be false