Check if the given value is an empty string.
npm install @chenfengyuan/is-empty-string   
> Check if the given value is an empty string.
``text`
dist/
├── is-empty-string.js (UMD)
├── is-empty-string.min.js (UMD, compressed)
├── is-empty-string.common.js (CommonJS, default)
└── is-empty-string.esm.js (ES Module)
`shell`
npm install @chenfengyuan/is-empty-string
`js`
isEmptyString(value, trim = false);
- value
- Type: *
- The value to check.
- trim (optional)
- Type: Booleanfalse
- Default:
- Indicates if remove whitespace from both ends of the value before length checking or not.
- (return value)
- Type: Booleantrue
- Returns if the given value is an empty string, else false.
`js
import isEmptyString from '@chenfengyuan/is-empty-string';
isEmptyString('');
// > true
isEmptyString(' ');
// > false
isEmptyString(' ', true);
// > true
isEmptyString('foo');
// > false
isEmptyString(1);
// > false
``