This RFC proposes adding the package @stdlib/array/base/cunone, which cumulatively tests whether every array element in a provided array is falsy. The function should return a new generic array. The package should also provide an #assign API for setting output values in a provided output array.
var x = [ false, false, false, true, false ];
var y1 = cunone( x );
// returns [ true, true, true, false, false ]
var y2 = [ false, null, false, null, false, null, false, null, false, null ];
var out = cunone.assign( x, y2, 2, 0 );
// returns [ true, null, true, null, true, null, false, null, false, null ]
where the assign API supports an offset and stride (see, e.g., @stdlib/array/base/take).
Both APIs should support accessor arrays (see, e.g., @stdlib/array/base/take).
Description
This RFC proposes adding the package
@stdlib/array/base/cunone
, which cumulatively tests whether every array element in a provided array is falsy. The function should return a new generic array. The package should also provide an#assign
API for setting output values in a provided output array.where the
assign
API supports an offset and stride (see, e.g.,@stdlib/array/base/take
).Both APIs should support accessor arrays (see, e.g.,
@stdlib/array/base/take
).Related Issues
No.
Questions
No.
Other
No.
Checklist
RFC:
.