@stdlib/array-base-cuevery 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/NOTICE CHANGED
@@ -1 +1 @@
1
- Copyright (c) 2016-2024 The Stdlib Authors.
1
+ Copyright (c) 2016-2026 The Stdlib Authors.
package/README.md CHANGED
@@ -153,7 +153,7 @@ See [LICENSE][stdlib-license].
153
153
 
154
154
  ## Copyright
155
155
 
156
- Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
156
+ Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors].
157
157
 
158
158
  </section>
159
159
 
@@ -166,8 +166,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
166
166
  [npm-image]: http://img.shields.io/npm/v/@stdlib/array-base-cuevery.svg
167
167
  [npm-url]: https://npmjs.org/package/@stdlib/array-base-cuevery
168
168
 
169
- [test-image]: https://github.com/stdlib-js/array-base-cuevery/actions/workflows/test.yml/badge.svg?branch=v0.1.0
170
- [test-url]: https://github.com/stdlib-js/array-base-cuevery/actions/workflows/test.yml?query=branch:v0.1.0
169
+ [test-image]: https://github.com/stdlib-js/array-base-cuevery/actions/workflows/test.yml/badge.svg?branch=v0.1.1
170
+ [test-url]: https://github.com/stdlib-js/array-base-cuevery/actions/workflows/test.yml?query=branch:v0.1.1
171
171
 
172
172
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/array-base-cuevery/main.svg
173
173
  [coverage-url]: https://codecov.io/github/stdlib-js/array-base-cuevery?branch=main
@@ -179,8 +179,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
179
179
 
180
180
  -->
181
181
 
182
- [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
183
- [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
182
+ [chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
183
+ [chat-url]: https://stdlib.zulipchat.com
184
184
 
185
185
  [stdlib]: https://github.com/stdlib-js/stdlib
186
186
 
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../lib/assign.js", "../lib/main.js", "../lib/index.js"],
4
- "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' );\nvar isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' );\nvar isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' );\nvar arraylike2object = require( '@stdlib/array-base-arraylike2object' );\nvar reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' );\nvar reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' );\nvar reinterpretBoolean = require( '@stdlib/strided-base-reinterpret-boolean' );\n\n\n// FUNCTIONS //\n\n/**\n* Cumulatively tests whether every element in an indexed array is truthy.\n*\n* @private\n* @param {Collection} x - input array\n* @param {Collection} y - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array offset\n* @returns {Collection} output array\n*\n* @example\n* var x = [ true, true, true, false, true ];\n* var y = [ false, null, false, null, false, null, false, null, false, null ];\n*\n* var out = indexed( x, y, 2, 0 );\n* // returns [ true, null, true, null, true, null, false, null, false, null ]\n*/\nfunction indexed( x, y, stride, offset ) {\n\tvar flg;\n\tvar io;\n\tvar i;\n\n\tflg = true;\n\tio = offset;\n\tfor ( i = 0; i < x.length; i++ ) {\n\t\tif ( flg === true && !x[ i ] ) {\n\t\t\tflg = false;\n\t\t}\n\t\ty[ io ] = flg;\n\t\tio += stride;\n\t}\n\treturn y;\n}\n\n/**\n* Cumulatively tests whether every element in a provided accessor array is truthy.\n*\n* @private\n* @param {Object} x - input array object\n* @param {Object} y - output array object\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array offset\n* @returns {Collection} output array\n*\n* @example\n* var toAccessorArray = require( '@stdlib/array-base-to-accessor-array' );\n* var arraylike2object = require( '@stdlib/array-base-arraylike2object' );\n*\n* var x = toAccessorArray( [ true, true, true, false, true ] );\n* var y = toAccessorArray( [ false, null, false, null, false, null, false, null, false, null ] );\n*\n* var arr = accessors( arraylike2object( x ), arraylike2object( y ), 2, 0 );\n*\n* var v = y.get( 0 );\n* // returns true\n*\n* v = y.get( 2 );\n* // returns true\n*\n* v = y.get( 4 );\n* // returns true\n*\n* v = y.get( 6 );\n* // returns false\n*\n* v = y.get( 8 );\n* // returns false\n*/\nfunction accessors( x, y, stride, offset ) {\n\tvar xdata;\n\tvar ydata;\n\tvar xget;\n\tvar yset;\n\tvar flg;\n\tvar io;\n\tvar i;\n\n\txdata = x.data;\n\tydata = y.data;\n\n\txget = x.accessors[ 0 ];\n\tyset = y.accessors[ 1 ];\n\n\tflg = true;\n\tio = offset;\n\tfor ( i = 0; i < xdata.length; i++ ) {\n\t\tif ( flg === true && !xget( xdata, i ) ) {\n\t\t\tflg = false;\n\t\t}\n\t\tyset( ydata, io, flg );\n\t\tio += stride;\n\t}\n\treturn ydata;\n}\n\n/**\n* Cumulatively tests whether every element in a provided complex number array is truthy.\n*\n* @private\n* @param {Collection} x - array containing interleaved real and imaginary components\n* @param {Object} y - output array object\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array offset\n* @returns {Collection} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var toAccessorArray = require( '@stdlib/array-base-to-accessor-array' );\n* var arraylike2object = require( '@stdlib/array-base-arraylike2object' );\n*\n* var x = new Float64Array( [ 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0 ] );\n* var y = toAccessorArray( [ false, null, false, null, false, null, false, null, true, null ] );\n*\n* var arr = complex( x, arraylike2object( y ), 2, 0 );\n*\n* var v = y.get( 0 );\n* // returns true\n*\n* v = y.get( 2 );\n* // returns true\n*\n* v = y.get( 4 );\n* // returns true\n*\n* v = y.get( 6 );\n* // returns false\n*\n* v = y.get( 8 );\n* // returns false\n*/\nfunction complex( x, y, stride, offset ) {\n\tvar ydata;\n\tvar yset;\n\tvar flg;\n\tvar io;\n\tvar i;\n\n\tyset = y.accessors[ 1 ];\n\tydata = y.data;\n\n\tflg = true;\n\tio = offset;\n\tfor ( i = 0; i < x.length; i += 2 ) {\n\t\tif ( flg === true && !( x[ i ] || x[ i+1 ] ) ) {\n\t\t\tflg = false;\n\t\t}\n\t\tyset( ydata, io, flg );\n\t\tio += stride;\n\t}\n\treturn ydata;\n}\n\n/**\n* Cumulatively tests whether every element in a provided boolean array is truthy.\n*\n* @private\n* @param {Collection} x - input array\n* @param {Object} y - output array object\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array offset\n* @returns {Collection} output array\n*\n* @example\n* var Uint8Array = require( '@stdlib/array-uint8' );\n* var toAccessorArray = require( '@stdlib/array-base-to-accessor-array' );\n* var arraylike2object = require( '@stdlib/array-base-arraylike2object' );\n*\n* var x = new Uint8Array( [ 1, 1, 1, 0, 1 ] );\n* var y = toAccessorArray( [ false, null, false, null, false, null, false, null, true, null ] );\n*\n* var arr = boolean( x, arraylike2object( y ), 2, 0 );\n*\n* var v = y.get( 0 );\n* // returns true\n*\n* v = y.get( 2 );\n* // returns true\n*\n* v = y.get( 4 );\n* // returns true\n*\n* v = y.get( 6 );\n* // returns false\n*\n* v = y.get( 8 );\n* // returns false\n*/\nfunction boolean( x, y, stride, offset ) {\n\tvar ydata;\n\tvar yset;\n\tvar flg;\n\tvar io;\n\tvar i;\n\n\tyset = y.accessors[ 1 ];\n\tydata = y.data;\n\n\tflg = true;\n\tio = offset;\n\tfor ( i = 0; i < x.length; i++ ) {\n\t\tif ( flg === true && !x[ i ] ) {\n\t\t\tflg = false;\n\t\t}\n\t\tyset( ydata, io, flg );\n\t\tio += stride;\n\t}\n\treturn ydata;\n}\n\n\n// MAIN //\n\n/**\n* Cumulatively tests whether every element in an array is truthy and assigns results to provided output array.\n*\n* @param {Collection} x - input array\n* @param {Collection} y - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array offset\n* @returns {Collection} output array\n*\n* @example\n* var x = [ true, true, true, false, true ];\n* var y = [ false, null, false, null, false, null, false, null, false, null ];\n*\n* var out = assign( x, y, 2, 0 );\n* // returns [ true, null, true, null, true, null, false, null, false, null ]\n*\n* var bool = ( y === out );\n* // returns true\n*/\nfunction assign( x, y, stride, offset ) {\n\tvar xo = arraylike2object( x );\n\tvar yo = arraylike2object( y );\n\tif (\n\t\txo.accessorProtocol ||\n\t\tyo.accessorProtocol\n\t) {\n\t\t// If provided a complex number array, reinterpret as a real typed array and test interleaved real and imaginary components, where we consider a complex number to be truthy if at least one component is non-zero...\n\t\tif ( isComplex128Array( x ) ) {\n\t\t\tcomplex( reinterpret128( x, 0 ), yo, stride, offset );\n\t\t} else if ( isComplex64Array( x ) ) {\n\t\t\tcomplex( reinterpret64( x, 0 ), yo, stride, offset );\n\t\t} else if ( isBooleanArray( x ) ) {\n\t\t\tboolean( reinterpretBoolean( x, 0 ), yo, stride, offset );\n\t\t} else {\n\t\t\taccessors( xo, yo, stride, offset );\n\t\t}\n\t\treturn y;\n\t}\n\tindexed( x, y, stride, offset );\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = assign;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar filled = require( '@stdlib/array-base-filled' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\n/**\n* Cumulatively tests whether at every element in a provided array is truthy.\n*\n* @param {Collection} x - input array\n* @returns {Array} output array\n*\n* @example\n* var x = [ true, true, true, false, true ];\n*\n* var y = cuevery( x );\n* // returns [ true, true, true, false, false ];\n*/\nfunction cuevery( x ) {\n\tvar y = filled( true, x.length );\n\treturn assign( x, y, 1, 0 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = cuevery;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Cumulatively test whether every element in a provided array is truthy.\n*\n* @module @stdlib/array-base-cuevery\n*\n* @example\n* var cuevery = require( '@stdlib/array-base-cuevery' );\n*\n* var x = [ true, true, true, false, true ]\n*\n* var y = cuevery( x );\n* // returns [ true, true, true, false, false ]\n*\n* @example\n* var cuevery = require( '@stdlib/array-base-cuevery' );\n*\n* var x = [ true, true, true, false, true ];\n* var y = [ false, null, false, null, false, null, false, null, false, null ];\n*\n* var arr = cuevery.assign( x, y, 2, 0 );\n* // returns [ true, null, true, null, true, null, false, null, false, null ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
4
+ "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isComplex128Array = require( '@stdlib/array-base-assert-is-complex128array' );\nvar isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' );\nvar isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' );\nvar arraylike2object = require( '@stdlib/array-base-arraylike2object' );\nvar reinterpret128 = require( '@stdlib/strided-base-reinterpret-complex128' );\nvar reinterpret64 = require( '@stdlib/strided-base-reinterpret-complex64' );\nvar reinterpretBoolean = require( '@stdlib/strided-base-reinterpret-boolean' );\n\n\n// FUNCTIONS //\n\n/**\n* Cumulatively tests whether every element in an indexed array is truthy.\n*\n* @private\n* @param {Collection} x - input array\n* @param {Collection} y - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array offset\n* @returns {Collection} output array\n*\n* @example\n* var x = [ true, true, true, false, true ];\n* var y = [ false, null, false, null, false, null, false, null, false, null ];\n*\n* var out = indexed( x, y, 2, 0 );\n* // returns [ true, null, true, null, true, null, false, null, false, null ]\n*/\nfunction indexed( x, y, stride, offset ) {\n\tvar flg;\n\tvar io;\n\tvar i;\n\n\tflg = true;\n\tio = offset;\n\tfor ( i = 0; i < x.length; i++ ) {\n\t\tif ( flg === true && !x[ i ] ) {\n\t\t\tflg = false;\n\t\t}\n\t\ty[ io ] = flg;\n\t\tio += stride;\n\t}\n\treturn y;\n}\n\n/**\n* Cumulatively tests whether every element in a provided accessor array is truthy.\n*\n* @private\n* @param {Object} x - input array object\n* @param {Object} y - output array object\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array offset\n* @returns {Collection} output array\n*\n* @example\n* var toAccessorArray = require( '@stdlib/array-base-to-accessor-array' );\n* var arraylike2object = require( '@stdlib/array-base-arraylike2object' );\n*\n* var x = toAccessorArray( [ true, true, true, false, true ] );\n* var y = toAccessorArray( [ false, null, false, null, false, null, false, null, false, null ] );\n*\n* var arr = accessors( arraylike2object( x ), arraylike2object( y ), 2, 0 );\n*\n* var v = y.get( 0 );\n* // returns true\n*\n* v = y.get( 2 );\n* // returns true\n*\n* v = y.get( 4 );\n* // returns true\n*\n* v = y.get( 6 );\n* // returns false\n*\n* v = y.get( 8 );\n* // returns false\n*/\nfunction accessors( x, y, stride, offset ) {\n\tvar xdata;\n\tvar ydata;\n\tvar xget;\n\tvar yset;\n\tvar flg;\n\tvar io;\n\tvar i;\n\n\txdata = x.data;\n\tydata = y.data;\n\n\txget = x.accessors[ 0 ];\n\tyset = y.accessors[ 1 ];\n\n\tflg = true;\n\tio = offset;\n\tfor ( i = 0; i < xdata.length; i++ ) {\n\t\tif ( flg === true && !xget( xdata, i ) ) {\n\t\t\tflg = false;\n\t\t}\n\t\tyset( ydata, io, flg );\n\t\tio += stride;\n\t}\n\treturn ydata;\n}\n\n/**\n* Cumulatively tests whether every element in a provided complex number array is truthy.\n*\n* @private\n* @param {Collection} x - array containing interleaved real and imaginary components\n* @param {Object} y - output array object\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array offset\n* @returns {Collection} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var toAccessorArray = require( '@stdlib/array-base-to-accessor-array' );\n* var arraylike2object = require( '@stdlib/array-base-arraylike2object' );\n*\n* var x = new Float64Array( [ 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0 ] );\n* var y = toAccessorArray( [ false, null, false, null, false, null, false, null, true, null ] );\n*\n* var arr = complex( x, arraylike2object( y ), 2, 0 );\n*\n* var v = y.get( 0 );\n* // returns true\n*\n* v = y.get( 2 );\n* // returns true\n*\n* v = y.get( 4 );\n* // returns true\n*\n* v = y.get( 6 );\n* // returns false\n*\n* v = y.get( 8 );\n* // returns false\n*/\nfunction complex( x, y, stride, offset ) {\n\tvar ydata;\n\tvar yset;\n\tvar flg;\n\tvar io;\n\tvar i;\n\n\tyset = y.accessors[ 1 ];\n\tydata = y.data;\n\n\tflg = true;\n\tio = offset;\n\tfor ( i = 0; i < x.length; i += 2 ) {\n\t\tif ( flg === true && !( x[ i ] || x[ i+1 ] ) ) {\n\t\t\tflg = false;\n\t\t}\n\t\tyset( ydata, io, flg );\n\t\tio += stride;\n\t}\n\treturn ydata;\n}\n\n/**\n* Cumulatively tests whether every element in a provided boolean array is truthy.\n*\n* @private\n* @param {Collection} x - input array\n* @param {Object} y - output array object\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array offset\n* @returns {Collection} output array\n*\n* @example\n* var Uint8Array = require( '@stdlib/array-uint8' );\n* var toAccessorArray = require( '@stdlib/array-base-to-accessor-array' );\n* var arraylike2object = require( '@stdlib/array-base-arraylike2object' );\n*\n* var x = new Uint8Array( [ 1, 1, 1, 0, 1 ] );\n* var y = toAccessorArray( [ false, null, false, null, false, null, false, null, true, null ] );\n*\n* var arr = boolean( x, arraylike2object( y ), 2, 0 );\n*\n* var v = y.get( 0 );\n* // returns true\n*\n* v = y.get( 2 );\n* // returns true\n*\n* v = y.get( 4 );\n* // returns true\n*\n* v = y.get( 6 );\n* // returns false\n*\n* v = y.get( 8 );\n* // returns false\n*/\nfunction boolean( x, y, stride, offset ) {\n\tvar ydata;\n\tvar yset;\n\tvar flg;\n\tvar io;\n\tvar i;\n\n\tyset = y.accessors[ 1 ];\n\tydata = y.data;\n\n\tflg = true;\n\tio = offset;\n\tfor ( i = 0; i < x.length; i++ ) {\n\t\tif ( flg === true && !x[ i ] ) {\n\t\t\tflg = false;\n\t\t}\n\t\tyset( ydata, io, flg );\n\t\tio += stride;\n\t}\n\treturn ydata;\n}\n\n\n// MAIN //\n\n/**\n* Cumulatively tests whether every element in an array is truthy and assigns results to a provided output array.\n*\n* @param {Collection} x - input array\n* @param {Collection} y - output array\n* @param {integer} stride - output array stride\n* @param {NonNegativeInteger} offset - output array offset\n* @returns {Collection} output array\n*\n* @example\n* var x = [ true, true, true, false, true ];\n* var y = [ false, null, false, null, false, null, false, null, false, null ];\n*\n* var out = assign( x, y, 2, 0 );\n* // returns [ true, null, true, null, true, null, false, null, false, null ]\n*\n* var bool = ( y === out );\n* // returns true\n*/\nfunction assign( x, y, stride, offset ) {\n\tvar xo = arraylike2object( x );\n\tvar yo = arraylike2object( y );\n\tif (\n\t\txo.accessorProtocol ||\n\t\tyo.accessorProtocol\n\t) {\n\t\t// If provided a complex number array, reinterpret as a real typed array and test interleaved real and imaginary components, where we consider a complex number to be truthy if at least one component is non-zero...\n\t\tif ( isComplex128Array( x ) ) {\n\t\t\tcomplex( reinterpret128( x, 0 ), yo, stride, offset );\n\t\t} else if ( isComplex64Array( x ) ) {\n\t\t\tcomplex( reinterpret64( x, 0 ), yo, stride, offset );\n\t\t} else if ( isBooleanArray( x ) ) {\n\t\t\tboolean( reinterpretBoolean( x, 0 ), yo, stride, offset );\n\t\t} else {\n\t\t\taccessors( xo, yo, stride, offset );\n\t\t}\n\t\treturn y;\n\t}\n\tindexed( x, y, stride, offset );\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = assign;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar filled = require( '@stdlib/array-base-filled' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\n/**\n* Cumulatively tests whether every element in a provided array is truthy.\n*\n* @param {Collection} x - input array\n* @returns {Array} output array\n*\n* @example\n* var x = [ true, true, true, false, true ];\n*\n* var y = cuevery( x );\n* // returns [ true, true, true, false, false ];\n*/\nfunction cuevery( x ) {\n\tvar y = filled( true, x.length );\n\treturn assign( x, y, 1, 0 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = cuevery;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Cumulatively test whether every element in a provided array is truthy.\n*\n* @module @stdlib/array-base-cuevery\n*\n* @example\n* var cuevery = require( '@stdlib/array-base-cuevery' );\n*\n* var x = [ true, true, true, false, true ];\n*\n* var y = cuevery( x );\n* // returns [ true, true, true, false, false ]\n*\n* @example\n* var cuevery = require( '@stdlib/array-base-cuevery' );\n*\n* var x = [ true, true, true, false, true ];\n* var y = [ false, null, false, null, false, null, false, null, false, null ];\n*\n* var arr = cuevery.assign( x, y, 2, 0 );\n* // returns [ true, null, true, null, true, null, false, null, false, null ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
5
5
  "mappings": "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",
6
6
  "names": ["require_assign", "__commonJSMin", "exports", "module", "isComplex128Array", "isComplex64Array", "isBooleanArray", "arraylike2object", "reinterpret128", "reinterpret64", "reinterpretBoolean", "indexed", "x", "y", "stride", "offset", "flg", "io", "accessors", "xdata", "ydata", "xget", "yset", "i", "complex", "boolean", "assign", "xo", "yo", "require_main", "__commonJSMin", "exports", "module", "filled", "assign", "cuevery", "x", "y", "setReadOnly", "main", "assign"]
7
7
  }
@@ -36,7 +36,7 @@ interface CuEvery {
36
36
  * var x = [ true, true, true, false, true ];
37
37
  *
38
38
  * var y = cuevery( x );
39
- * // returns [ true, true, true, false, false ];
39
+ * // returns [ true, true, true, false, false ];
40
40
  */
41
41
  ( x: Collection | AccessorArrayLike<any> ): Array<boolean>;
42
42
 
@@ -53,7 +53,7 @@ interface CuEvery {
53
53
  * var x = [ true, true, true, false, false ];
54
54
  * var y = [ false, null, false, null, false, null, false, null, false, null ];
55
55
  *
56
- * var arr = cuevery.assign( x, y, 2, 0 );,
56
+ * var arr = cuevery.assign( x, y, 2, 0 );
57
57
  * // returns [ true, null, true, null, true, null, false, null, false, null ];
58
58
  */
59
59
  assign<T, U extends Collection<T> | AccessorArrayLike<T>>( x: Collection | AccessorArrayLike<any>, y: U, stride: number, offset: number ): U;
package/lib/assign.js CHANGED
@@ -244,7 +244,7 @@ function boolean( x, y, stride, offset ) {
244
244
  // MAIN //
245
245
 
246
246
  /**
247
- * Cumulatively tests whether every element in an array is truthy and assigns results to provided output array.
247
+ * Cumulatively tests whether every element in an array is truthy and assigns results to a provided output array.
248
248
  *
249
249
  * @param {Collection} x - input array
250
250
  * @param {Collection} y - output array
package/lib/index.js CHANGED
@@ -26,7 +26,7 @@
26
26
  * @example
27
27
  * var cuevery = require( '@stdlib/array-base-cuevery' );
28
28
  *
29
- * var x = [ true, true, true, false, true ]
29
+ * var x = [ true, true, true, false, true ];
30
30
  *
31
31
  * var y = cuevery( x );
32
32
  * // returns [ true, true, true, false, false ]
package/lib/main.js CHANGED
@@ -27,7 +27,7 @@ var assign = require( './assign.js' );
27
27
  // MAIN //
28
28
 
29
29
  /**
30
- * Cumulatively tests whether at every element in a provided array is truthy.
30
+ * Cumulatively tests whether every element in a provided array is truthy.
31
31
  *
32
32
  * @param {Collection} x - input array
33
33
  * @returns {Array} output array
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/array-base-cuevery",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Cumulatively test whether every element in a provided array is truthy.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -30,15 +30,15 @@
30
30
  "url": "https://github.com/stdlib-js/stdlib/issues"
31
31
  },
32
32
  "dependencies": {
33
- "@stdlib/array-base-arraylike2object": "^0.2.1",
34
- "@stdlib/array-base-assert-is-booleanarray": "^0.0.2",
35
- "@stdlib/array-base-assert-is-complex128array": "^0.2.2",
36
- "@stdlib/array-base-assert-is-complex64array": "^0.2.2",
37
- "@stdlib/array-base-filled": "^0.2.2",
38
- "@stdlib/strided-base-reinterpret-boolean": "^0.0.2",
39
- "@stdlib/strided-base-reinterpret-complex128": "^0.2.2",
40
- "@stdlib/strided-base-reinterpret-complex64": "^0.2.1",
41
- "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2"
33
+ "@stdlib/array-base-arraylike2object": "^0.2.2",
34
+ "@stdlib/array-base-assert-is-booleanarray": "^0.0.3",
35
+ "@stdlib/array-base-assert-is-complex128array": "^0.2.3",
36
+ "@stdlib/array-base-assert-is-complex64array": "^0.2.3",
37
+ "@stdlib/array-base-filled": "^0.2.3",
38
+ "@stdlib/strided-base-reinterpret-boolean": "^0.0.3",
39
+ "@stdlib/strided-base-reinterpret-complex128": "^0.2.3",
40
+ "@stdlib/strided-base-reinterpret-complex64": "^0.2.2",
41
+ "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.3"
42
42
  },
43
43
  "devDependencies": {},
44
44
  "engines": {