Package Exports
- @stdlib/assert-is-plain-object-array
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@stdlib/assert-is-plain-object-array) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
isPlainObjectArray
Test if a value is an array-like object containing only plain objects.
Installation
npm install @stdlib/assert-is-plain-object-arrayUsage
var isPlainObjectArray = require( '@stdlib/assert-is-plain-object-array' );isPlainObjectArray( value )
Tests if a value is an array-like object containing only plain objects.
var Number = require( '@stdlib/number-ctor' );
var bool = isPlainObjectArray( [ {}, { 'beep': 'boop' } ] );
// returns true
bool = isPlainObjectArray( [ {}, new Number(3.0) ] );
// returns false
bool = isPlainObjectArray( [ {}, '3.0' ] );
// returns false
bool = isPlainObjectArray( [] );
// returns false
bool = isPlainObjectArray( [ null, {} ] );
// returns falseExamples
var Number = require( '@stdlib/number-ctor' );
var isPlainObjectArray = require( '@stdlib/assert-is-plain-object-array' );
var bool = isPlainObjectArray( [ { 'beep': 'boop' }, {}, {} ] );
// returns true
bool = isPlainObjectArray( [ new Date(), new Number( 3 ) ] );
// returns false
bool = isPlainObjectArray( [ {}, new String( 'abc' ), {} ] );
// returns false
bool = isPlainObjectArray( [ [], {} ] );
// returns false
bool = isPlainObjectArray( [ 'a', 'b' ] );
// returns false
bool = isPlainObjectArray( [] );
// returns falseNotice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
License
See LICENSE.
Copyright
Copyright © 2016-2021. The Stdlib Authors.