is-present
Check whether a value is nonblank.
Installation
npm i --save is-present
Usage
var isPresent = require('is-present');
isPresent([]);
isPresent({});
isPresent(0);
isPresent(function(){});
isPresent(null);
isPresent(undefined);
isPresent('');
isPresent(' ');
isPresent('\r\t\n ');
isPresent(['a', 'b']);
isPresent({ a: 'b' });
isPresent('string');
isPresent(42);
isPresent(function(a,b){});
Acknowledgements
A negation for is-blank which extends
is-empty and
is-whitespace.
License
MIT
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Crafted with <3 by John Otander (@4lpine).