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.

1 lines 566 B
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).isSANB=e()}}(function(){return function(e){return"string"==typeof e&&!function(e){for(var n,f=e.length,o=0;o<f;o++)if(((n=e.charCodeAt(o))<9||n>13)&&32!==n&&133!==n&&160!==n&&5760!==n&&6158!==n&&(n<8192||n>8205)&&8232!==n&&8233!==n&&8239!==n&&8287!==n&&8288!==n&&12288!==n&&65279!==n)return!1;return!0}(e)}});