Skip to content

Commit f6b1344

Browse files
committed
Auto-generated commit
1 parent 336d505 commit f6b1344

File tree

6 files changed

+10
-17
lines changed

6 files changed

+10
-17
lines changed

.github/.keepalive

-1
This file was deleted.

NOTICE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Copyright (c) 2016-2023 The Stdlib Authors.
1+
Copyright (c) 2016-2024 The Stdlib Authors.

dist/index.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/main.js

+2-9
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// MODULES //
2222

2323
var isCollection = require( '@stdlib/assert-is-collection' );
24+
var base = require( '@stdlib/array-base-every' );
2425
var format = require( '@stdlib/string-format' );
2526

2627

@@ -40,18 +41,10 @@ var format = require( '@stdlib/string-format' );
4041
* // returns true
4142
*/
4243
function every( collection ) {
43-
var len;
44-
var i;
4544
if ( !isCollection( collection ) ) {
4645
throw new TypeError( format( 'invalid argument. Must provide a collection. Value: `%s`.', collection ) );
4746
}
48-
len = collection.length;
49-
for ( i = 0; i < len; i++ ) {
50-
if ( !collection[ i ] ) {
51-
return false;
52-
}
53-
}
54-
return true;
47+
return base( collection );
5548
}
5649

5750

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"url": "https://github.com/stdlib-js/stdlib/issues"
3838
},
3939
"dependencies": {
40+
"@stdlib/array-base-every": "github:stdlib-js/array-base-every#main",
4041
"@stdlib/assert-is-collection": "^0.1.0",
4142
"@stdlib/string-format": "^0.1.1",
4243
"@stdlib/types": "^0.2.0"

0 commit comments

Comments
 (0)