is-valid-value
v1.0.2
Published
It is an npm package to validate if the value is null, empty or undefined
Downloads
1
Maintainers
Readme
What is 'is-valid-value'?
It is a npm package that contains a simple class with a static function that Return a true if the value is not a empty,null or undefined and false if it is.
null = when the value wass set to null 'var somevalue = null'
empty = this just apply if is a string, when the value wass set to empty string 'var somevalue = '' '
undefinid = when the values wass not defined y just wass declared 'var somevalue ' or when the value not exists
How to use it?
const object = require(is-valid-value).Validate;
let varExample;
if(object.value(varExample))
{
console.log('im validate')
}else{
//it inside heare
console.log('im not validate because im undefined')
}