1.0.2 • Published 4 years ago

is-valid-value v1.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

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')
}