Skip to content

Commit

Permalink
Add packages/validator package
Browse files Browse the repository at this point in the history
  • Loading branch information
erzhtor committed Jan 5, 2019
1 parent db8a74c commit 601b3bd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/validator/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/**
* Checks if given value is null or undefined or whitespace string
* @param {string?} value
*/
exports.isNullOrWhitespace = (value) => value === undefined || value === null || !value.trim();
12 changes: 12 additions & 0 deletions packages/validator/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "@my-project/validator",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}

0 comments on commit 601b3bd

Please sign in to comment.