Closed
Description
Description
This RFC proposes adding the package @stdlib/array/base/cuany
, which cumulatively tests whether at least one array element in a provided array is truthy. 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, true, false, false ];
var y1 = cuany( x );
// returns [ false, false, true, true, true ]
var y2 = [ false, null, false, null, false, null, false, null, false, null ];
var out = cuany.assign( x, y2, 2, 0 );
// returns [ false, null, false, null, true, null, true, null, true, 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
- I have read and understood the Code of Conduct.
- Searched for existing issues and pull requests.
- The issue name begins with
RFC:
.
Metadata
Metadata
Assignees
Labels
RFC feature request which has been accepted.Issue or pull request for adding a new feature.A good first issue for new contributors!Issue involves or relates to JavaScript.Request for comments. Feature requests and proposed changes.May require some initial design or R&D, but should be straightforward to resolve and/or implement.Normal priority concern or feature request.