@hugoalh/is-object-plain
v1.0.9
Published
A module to determine whether the item is plain object.
Readme
Is Object Plain (ES)
🔗 DistBoard @hugoalh ● GitHub ● JSR ● NPM
An ECMAScript module to determine whether the item is plain object.
🎯 Runtime Targets
Any runtime which support ECMAScript should able to use this; These runtimes are officially supported:
🛡️ Runtime Permissions
This does not request any runtime permission.
#️⃣ Entrypoints
| Name | Path | Description |
|:--|:--|:--|
| . | ./mod.ts | Default. |
[!NOTE]
- Different runtimes have vary support for the entrypoints, visit the runtime documentation for more information.
- These are not part of the public APIs hence should not be used:
- Benchmark/Test file (e.g.:
example.bench.ts,example.test.ts).- Entrypoint name or path include any underscore prefix (e.g.:
_example.ts,foo/_example.ts).- Identifier/Namespace/Symbol include any underscore prefix (e.g.:
_example,Foo._example).
🧩 APIs
function isObjectPlain(item: unknown): item is object;
[!NOTE]
- For the full or prettier documentation, can visit via:
✍️ Examples
isObjectPlain(new Map([ ["a", 1], ["b", 2], ["c", 3] ])); //=> falseisObjectPlain({ a: 1, b: 2, c: 3 }); //=> true
