Skip to content

Commit

Permalink
docs: add isEmptyObject docs
Browse files Browse the repository at this point in the history
  • Loading branch information
abxlfazl authored and ASafaeirad committed Mar 5, 2024
1 parent 923a027 commit 7809f45
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/pages/guard/_meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"is-boolean": "isBoolean",
"is-empty-object": "isEmptyObject",
"is-function": "isFunction",
"is-iterable": "isIterable",
"is-map": "isMap",
Expand Down
33 changes: 33 additions & 0 deletions docs/pages/guard/is-empty-object.mdx
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
```

0 comments on commit 7809f45

Please sign in to comment.