1.0.3 • Published 2 years ago

@iyowei/not-empty-string v1.0.3

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

notEmptyString(str)

如果是字符串,并且非空(''),则返回 true,否则 false

使用

import notEmptyString from '@iyowei/esm-not-empty-string';

console.log('notEmptyString("")', notEmptyString("")); // false
console.log('notEmptyString("text")', notEmptyString("text")); // true

console.log("notEmptyString(true)", notEmptyString(true)); // false
console.log("notEmptyString(1)", notEmptyString(1)); // false
console.log('notEmptyString(NaN)', notEmptyString(NaN)); // false
console.log('notEmptyString(null)', notEmptyString(null)); // false

安装

Node version

# Pnpm
pnpm add @iyowei/not-empty-string

# yarn
yarn add @iyowei/not-empty-string

# npm
npm add @iyowei/not-empty-string

参与贡献

PRs Welcome