UNPKG

is-string-and-not-blank

Version:

3x as fast as `is-whitespace` and `whitespace-regex` thanks to `is-string-blank`. This package is a simple function that accepts an argument and returns `true` if it is a string AND it is not blank. Supports Node and Browser environments.

9 lines (6 loc) 171 B
"use strict"; var isStringBlank = require('is-string-blank'); function isSANB(val) { return typeof val === 'string' && !isStringBlank(val); } module.exports = isSANB;