@6footgeek/validate-whitespace-string 中文文档教程
@6footgeek/validate-whitespace-string
空白验证器,允许使用空白,但字符串不能只包含空白字符。
Installation
$ [sudo] npm install @6footgeek/validate-whitespace-string
Usage
import {validateWhitespaceString} from '@6footgeek/validate-whitespace-string';
validateWhitespaceString('test this string'); // true
validateWhitespaceString(' '); // false
validateWhitespaceString(123); // throws error
License
@6footgeek/validate-whitespace-string
A whitespace validator, whitespace is allowed, but the string cant consist only of whitespace characters.
Installation
$ [sudo] npm install @6footgeek/validate-whitespace-string
Usage
import {validateWhitespaceString} from '@6footgeek/validate-whitespace-string';
validateWhitespaceString('test this string'); // true
validateWhitespaceString(' '); // false
validateWhitespaceString(123); // throws error