stdlib
stdlib copied to clipboard
[RFC]: add `@stdlib/array/base/cunone`
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.
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).
Related Issues
No.
Questions
No.
Other
No.
Checklist
- [X] I have read and understood the Code of Conduct.
- [X] Searched for existing issues and pull requests.
- [X] The issue name begins with
RFC:.
I'd like to work on this !
@adityacodes30 Assigned.