Test if a value is a
structinstance.
var isStruct = require( '@stdlib/assert/is-struct' );Tests if a value is a struct instance.
var structFactory = require( '@stdlib/dstructs/struct' );
var schema = [
{
'name': 'value',
'type': 'float64'
}
];
var Struct = structFactory( schema );
var bool = isStruct( new Struct() );
// returns truevar structFactory = require( '@stdlib/dstructs/struct' );
var isStruct = require( '@stdlib/assert/is-struct' );
var schema = [
{
'name': 'value',
'type': 'float64'
}
];
var Struct = structFactory( schema );
var bool = isStruct( new Struct() );
// returns true
bool = isStruct( [ 1, 2, 3, 4 ] );
// returns false
bool = isStruct( {} );
// returns false
bool = isStruct( null );
// returns false@stdlib/assert/is-struct-constructor-like: test if a value is struct constructor-like.@stdlib/dstructs/struct: fixed-width composite data type (a.k.a., astruct).