Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions lib/node_modules/@stdlib/utils/some-by-right/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,23 +159,16 @@ var mean = context.sum / context.count;
<!-- eslint no-undef: "error" -->

```javascript
var randu = require( '@stdlib/random/base/randu' );
var randu = require( '@stdlib/random/array/randu' );
var someByRight = require( '@stdlib/utils/some-by-right' );

function threshold( value ) {
return ( value > 0.95 );
}

var bool;
var arr;
var i;
var arr = randu( 100 ); // eslint-disable-line stdlib/no-redeclare

arr = new Array( 100 );
for ( i = 0; i < arr.length; i++ ) {
arr[ i ] = randu();
}

bool = someByRight( arr, 5, threshold );
var bool = someByRight( arr, 5, threshold );
// returns <boolean>
```

Expand Down
19 changes: 6 additions & 13 deletions lib/node_modules/@stdlib/utils/some-by-right/examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,14 @@

'use strict';

var randu = require( '@stdlib/random/base/randu' );
var randu = require( '@stdlib/random/array/randu' );
var someByRight = require( './../lib' );

function threshold( value ) {
return ( value > 0.95 );
function threshold(value) {
return (value > 0.95);
}

var bool;
var arr;
var i;
var arr = randu(100);

arr = new Array( 100 );
for ( i = 0; i < arr.length; i++ ) {
arr[ i ] = randu();
}

bool = someByRight( arr, 5, threshold );
console.log( bool );
var bool = someByRight(arr, 5, threshold);
console.log(bool);