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: 5 months 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 (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-13T11:28:31.000Z (almost 6 years ago)
- Last Synced: 2025-01-27T01:52:34.861Z (5 months 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