All Projects → jonschlinkert → Is Plain Object

jonschlinkert / Is Plain Object

Licence: mit
Returns true if the given value is an object created by the Object constructor.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Is Plain Object

Deep Object Diff
Deep diffs two objects, including nested structures of arrays and objects, and returns the difference. ❄️
Stars: ✭ 515 (+359.82%)
Mutual labels:  object
Dlv
Safe deep property access in 120 bytes. x = dlv(obj, 'a.b.x')
Stars: ✭ 1,071 (+856.25%)
Mutual labels:  object
Trdis
The most known way to travel in space and time
Stars: ✭ 83 (-25.89%)
Mutual labels:  object
Icaro
Smart and efficient javascript object observer, ideal for batching DOM updates (~1kb)
Stars: ✭ 568 (+407.14%)
Mutual labels:  object
Change By Example
Finds a function that transforms a given object into another given object.
Stars: ✭ 32 (-71.43%)
Mutual labels:  object
Reacom
ReaCOM has got a lot of tools to use and is related to component object model
Stars: ✭ 57 (-49.11%)
Mutual labels:  object
Fmt Obj
Stringifies any javascript object in your console for CLI inspection ✨
Stars: ✭ 428 (+282.14%)
Mutual labels:  object
Object Explorer
🔥 A resource to help figure out what JavaScript object method would be best to use at any given time
Stars: ✭ 1,358 (+1112.5%)
Mutual labels:  object
Objecttransport
Send and Receive objects over TCP or UDP
Stars: ✭ 39 (-65.18%)
Mutual labels:  object
Seg By Interaction
Unsupervised instance segmentation via active robot interaction
Stars: ✭ 78 (-30.36%)
Mutual labels:  object
Shallow Clone
Make a shallow clone of an object, array or primitive.
Stars: ✭ 23 (-79.46%)
Mutual labels:  object
Object.reduce
Reduces an object to a value that is the accumulated result of running each property in the object through a callback. JavaScript/node.js utility.
Stars: ✭ 11 (-90.18%)
Mutual labels:  object
Shvl
🚧 Get and set dot-notated properties within an object.
Stars: ✭ 60 (-46.43%)
Mutual labels:  object
Moses
Utility library for functional programming in Lua
Stars: ✭ 541 (+383.04%)
Mutual labels:  object
Immutable Object
🔒 Immutable object library for PHP
Stars: ✭ 87 (-22.32%)
Mutual labels:  object
Object Graph
Provides useful operations on PHP object graphs
Stars: ✭ 443 (+295.54%)
Mutual labels:  object
Visma
Visual-Inertial-Semantic-MApping Dataset and tools
Stars: ✭ 54 (-51.79%)
Mutual labels:  object
Kibana Object Format
A Kibana plugin for displaying objects and arrays of objects.
Stars: ✭ 100 (-10.71%)
Mutual labels:  object
Ngx Dynamic Form Builder
FormBuilder + class-transformer + class-validator = dynamic form group builder for Angular10+
Stars: ✭ 93 (-16.96%)
Mutual labels:  object
Assign Deep
Deeply assign the enumerable properties of source objects to a destination object.
Stars: ✭ 70 (-37.5%)
Mutual labels:  object

is-plain-object NPM version NPM monthly downloads NPM total downloads Linux Build Status

Returns true if an object was created by the Object constructor, or Object.create(null).

Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your ❤️ and support.

Install

Install with npm:

$ npm install --save is-plain-object

Use isobject if you only want to check if the value is an object and not an array or null.

Usage

with es modules

import { isPlainObject } from 'is-plain-object';

or with commonjs

const { isPlainObject } = require('is-plain-object');

true when created by the Object constructor, or Object.create(null).

isPlainObject(Object.create({}));
//=> true
isPlainObject(Object.create(Object.prototype));
//=> true
isPlainObject({foo: 'bar'});
//=> true
isPlainObject({});
//=> true
isPlainObject(null);
//=> true

false when not created by the Object constructor.

isPlainObject(1);
//=> false
isPlainObject(['foo', 'bar']);
//=> false
isPlainObject([]);
//=> false
isPlainObject(new Foo);
//=> false
isPlainObject(Object.create(null));
//=> false

About

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Running Tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test
Building docs

(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)

To generate the readme, run the following command:

$ npm install -g verbose/verb#dev verb-generate-readme && verb

Related projects

You might also be interested in these projects:

Contributors

Commits Contributor
19 jonschlinkert
6 TrySound
6 stevenvachon
3 onokumus
1 wtgtybhertgeghgtwtg

Author

Jon Schlinkert

License

Copyright © 2019, Jon Schlinkert. Released under the MIT License.


This file was generated by verb-generate-readme, v0.8.0, on April 28, 2019.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].