is-plain-object
High-performance check for plain objects.
Part of the OcyrusJs suite.
✨ Features
- Blazing Fast: 4.5x faster than
lodash/isPlainObject. - Accurate: Correctly identifies objects created via
{},new Object(), orObject.create(null).
🚀 Performance
isPlainObject: ~24M ops/sec
📦 Installation
bash
npm install @ocyrusjs/is-plain-object🛠️ Usage
typescript
import { isPlainObject } from '@ocyrusjs/is-plain-object';
isPlainObject({}); // true
isPlainObject(new Object()); // true
isPlainObject([]); // falseLicense
MIT © Nishith Patel
