Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 20, 2024 via pnpm

isobject 1.0.2

Returns true if the value is an object and not an array or null.
Package summary
Share
0
issues
1
license
1
MIT
Package created
30 Jun 2014
Version published
13 Jul 2015
Maintainers
3
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
isobject@1.0.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of isobject 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does isobject do?

The npm package "isobject" is a utility function written in JavaScript that returns true if the provided value is an object, while specifically excluding arrays and null values. This function comes in handy when determining the type of a variable in JavaScript, particularly as the language treats arrays and nulls as typeof 'object'.

How do you use isobject?

To use the isobject npm package, you'll first need to install it. This can be accomplished by running npm install --save isobject in the command line of your project directory.

After installation, you can import it into your JavaScript file with import isObject from 'isobject';.

Here are some usage examples:

import isObject from 'isobject';

// this should return true
console.log(isObject({})); 
console.log(isObject(Object.create({})));
console.log(isObject(Object.create(Object.prototype)));
console.log(isObject(Object.create(null)));
console.log(isObject(new Foo));
console.log(isObject(/foo/));

// these should return false
console.log(isObject());
console.log(isObject(function () {}));
console.log(isObject(1));
console.log(isObject([]));
console.log(isObject(undefined));
console.log(isObject(null));

In the above examples, isObject checks if the provided values are objects, but not arrays or null.

Where are the isobject docs?

The official isobject package documentation can be found on its GitHub page. This documentation shares significant information about how the package works, installation procedures, and examples of how to use the function in your project. More detailed understanding can be gained from the source code, and you can also contribute by creating an issue for bugs and feature requests.