Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imedadel/is-empty-object-all-methods
5 functions to check if an object is empty or nah
https://github.com/imedadel/is-empty-object-all-methods
Last synced: 7 days ago
JSON representation
5 functions to check if an object is empty or nah
- Host: GitHub
- URL: https://github.com/imedadel/is-empty-object-all-methods
- Owner: imedadel
- Created: 2019-08-07T12:18:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-13T11:28:31.000Z (over 5 years ago)
- Last Synced: 2024-12-22T10:34:25.926Z (12 days ago)
- Language: TypeScript
- Size: 99.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# is-empty-object-all-methods
> 5 functions to test if an object is empty or nah## Usage
```js
import isEmpty from "is-empty-object-all-methods"console.log(isEmpty.useEntries({}))
//=> true
```Or, use a named import
```js
import {useEntries} from "is-empty-object-all-methods"console.log(useEntries({}))
//=> true
```## API
### `useEntries()`
> relies on Object.entries()### `useEntriesWOC()`
> same as `useEntries()` but doesn't check for Object### `useKeys()`
> relies on Object.keys()### `useKeysWOC()`
> same as `useKeys()` but doesn't check for Object### `useForIn()`
> relies on for .. in loop