Skip to content

Commit

Permalink
style(base): fix docs and whitespace around parentheses
Browse files Browse the repository at this point in the history
PR-URL: stdlib-js#2831
Ref: stdlib-js#2324
Co-authored-by: Mohammad Kaif <mdkaifprofession@gmail.com>
  • Loading branch information
Kaif987 committed Sep 8, 2024
1 parent fdb0f74 commit c25dda0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
42 changes: 21 additions & 21 deletions lib/node_modules/@stdlib/array/base/cuevery-by/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
-->

# cuevery-by
# cueveryBy

> Cumulatively test whether every array element in a provided array passes a test implemented by a predicate function.
Expand All @@ -32,7 +32,7 @@ var cueveryBy = require( '@stdlib/array/base/cuevery-by' );

#### cueveryBy( x, predicate\[, thisArg ] )

Cumulatively test whether every array element in a provided array passes a test implemented by a predicate function.
Cumulatively tests whether every array element in a provided array passes a test implemented by a predicate function.

```javascript
function fcn( value) {
Expand All @@ -45,25 +45,6 @@ var y = cueveryBy( x, fcn );
// returns [ true, true, false, false, false ]
```

#### cueveryBy.assign( x, out, stride, offset, predicate\[, thisArg ] )

Cumulatively test whether every array element in a provided array passes a test implemented by a predicate function.

```javascript
function fcn( v ) {
return ( v > 0 );
}

var x = [ 1, 1, 0, 0, 0 ];
var y = [ false, null, false, null, false, null, false, null, false, null ];

var out = cueveryBy.assign( x, y, 2, 0, fcn );
// returns [ true, null, true, null, false, null, false, null, false, null ]

var bool = ( out === y );
// returns true
```

The invoked `predicate` function is provided three arguments:

- `value`: collection element,
Expand Down Expand Up @@ -91,6 +72,25 @@ var count = context.count;
// returns 3
```

#### cueveryBy.assign( x, out, stride, offset, predicate\[, thisArg ] )

Cumulatively tests whether every array element in a provided array passes a test implemented by a predicate function and assigns the results to a provided output array.

```javascript
function fcn( v ) {
return ( v > 0 );
}

var x = [ 1, 1, 0, 0, 0 ];
var y = [ false, null, false, null, false, null, false, null, false, null ];

var out = cueveryBy.assign( x, y, 2, 0, fcn );
// returns [ true, null, true, null, false, null, false, null, false, null ]

var bool = ( out === y );
// returns true
```

</section>

<!-- /.usage -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
[ true, true, false, false, false ]


{{alias}}.assign( x, out, stride, offset, predicate[, thisArg])
{{alias}}.assign( x, out, stride, offset, predicate[, thisArg] )
Cumulatively tests whether every array element in a provided array passes
a test implemented by a predicate function and assigns the values to
elements in a provided output array.
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/array/base/cuevery-by/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'use strict';

/**
* Cumulatively tests whether every array element in a provided array passes a test implemented by a predicate function.
* Cumulatively test whether every array element in a provided array passes a test implemented by a predicate function.
*
* @module @stdlib/array/base/cuevery-by
*
Expand Down Expand Up @@ -56,7 +56,7 @@ var assign = require( './assign.js' );

// MAIN //

setReadOnly(main, 'assign', assign);
setReadOnly( main, 'assign', assign );


// EXPORTS //
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/array/base/cuevery-by",
"version": "0.0.0",
"description": "cumulatively tests whether every array element in a provided array passes a test implemented by a predicate function",
"description": "Cumulatively test whether every array element in a provided array passes a test implemented by a predicate function",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down

0 comments on commit c25dda0

Please sign in to comment.