0.0.1 • Published 4 years ago

@4us.dev/4us-utils v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

4us utils

StringUtils

const stringUtils = new StringUtils();
stringUtils;

isBlank and isNotBlank

stringUtils.isBlank(null); // true
stringUtils.isBlank(undefined); // true
stringUtils.isBlank(''); // true
stringUtils.isBlank('  '); // true
stringUtils.isBlank('a'); // false

stringUtils.isNotBlank(value) is equal to !stringUtils.isBlank(value)

isEmpty and isNotEmpty

stringUtils.isEmpty(null); // true
stringUtils.isEmpty(undefined); // true
stringUtils.isEmpty(''); // true
stringUtils.isEmpty('  '); // false
stringUtils.isEmpty('a'); // false

stringUtils.isNotEmpty(value) is equal to !stringUtils.isEmpty(value)