-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
923a027
commit 7809f45
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# isEmptyObject | ||
|
||
Check whether the given value is an empty object or not | ||
|
||
### Import | ||
|
||
```typescript copy | ||
import { isEmptyObject } from '@fullstacksjs/toolbox'; | ||
``` | ||
|
||
### Signature | ||
|
||
```typescript copy | ||
function isEmptyObject(x: unknown): x is boolean {}; | ||
``` | ||
|
||
### Examples | ||
|
||
```typescript copy | ||
isEmptyObject({}) // true | ||
isEmptyObject([]) // false | ||
isEmptyObject(10) // false | ||
isEmptyObject(true) // false | ||
isEmptyObject(null) // false | ||
isEmptyObject("bar") // false | ||
isEmptyObject({a: 1}) // false | ||
isEmptyObject(() => {}) // false | ||
isEmptyObject(new Map()) // false | ||
isEmptyObject(new Set()) // false | ||
isEmptyObject([1, "foo"]) // false | ||
isEmptyObject(new Set([1, true])) // false | ||
isEmptyObject(new Map([["a", 1]])) // false | ||
``` |