Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iyowei/not-empty-plain-object
检查传入参数是不是非空对象字面量。
https://github.com/iyowei/not-empty-plain-object
Last synced: about 7 hours ago
JSON representation
检查传入参数是不是非空对象字面量。
- Host: GitHub
- URL: https://github.com/iyowei/not-empty-plain-object
- Owner: iyowei
- License: mit
- Created: 2021-12-31T03:06:47.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-31T03:07:07.000Z (almost 3 years ago)
- Last Synced: 2024-10-30T01:44:42.607Z (9 days ago)
- Language: JavaScript
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# notEmptyPlainObject({})
> 检查传入参数是不是非空对象字面量。
## 使用
```js
import { log } from "console";
import notEmptyPlainObject from "@iyowei/not-empty-plain-object";log(notEmptyPlainObject({})); // false
log(notEmptyPlainObject({ a: "after" })); // true
log(notEmptyPlainObject('')); // false
log(notEmptyPlainObject(123)); // false
```## 安装
![esm][esm] [![Node Version Badge][node version badge]][download node.js] ![browser][browser]
```shell
# Pnpm
pnpm add @iyowei/not-empty-plain-object# yarn
yarn add @iyowei/not-empty-plain-object# npm
npm add @iyowei/not-empty-plain-object
```## 参与贡献
![PRs Welcome][prs welcome badge]
## 其它
"@iyowei/not-empty-plain-object" 使用 [@iyowei/create-esm][create-esm] 脚手架生成。
[browser]: https://img.shields.io/badge/Browser-orange?style=flat
[node version badge]: https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js
[download node.js]: https://nodejs.org/en/download/
[prs welcome badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat
[esm]: https://img.shields.io/badge/ESM-brightgreen?style=flat
[create-esm]: https://github.com/iyowei/create-esm