@@ -64,6 +64,7 @@ import cartesianSquare = require( '@stdlib/array/base/cartesian-square' );
64
64
import copy = require( '@stdlib/array/base/copy' ) ;
65
65
import copyIndexed = require( '@stdlib/array/base/copy-indexed' ) ;
66
66
import countFalsy = require( '@stdlib/array/base/count-falsy' ) ;
67
+ import countIf = require( '@stdlib/array/base/count-if' ) ;
67
68
import countSameValue = require( '@stdlib/array/base/count-same-value' ) ;
68
69
import countSameValueZero = require( '@stdlib/array/base/count-same-value-zero' ) ;
69
70
import countTruthy = require( '@stdlib/array/base/count-truthy' ) ;
@@ -115,6 +116,7 @@ import groupValues = require( '@stdlib/array/base/group-values' );
115
116
import groupValuesBy = require( '@stdlib/array/base/group-values-by' ) ;
116
117
import incrspace = require( '@stdlib/array/base/incrspace' ) ;
117
118
import indexOf = require( '@stdlib/array/base/index-of' ) ;
119
+ import join = require( '@stdlib/array/base/join' ) ;
118
120
import last = require( '@stdlib/array/base/last' ) ;
119
121
import lastIndexOf = require( '@stdlib/array/base/last-index-of' ) ;
120
122
import linspace = require( '@stdlib/array/base/linspace' ) ;
@@ -1343,6 +1345,26 @@ interface Namespace {
1343
1345
*/
1344
1346
countFalsy : typeof countFalsy ;
1345
1347
1348
+ /**
1349
+ * Counts the number of elements in an array which pass a test implemented by a predicate function.
1350
+ *
1351
+ * @param x - input array
1352
+ * @param predicate - predicate function
1353
+ * @param thisArg - predicate function execution context
1354
+ * @returns result
1355
+ *
1356
+ * @example
1357
+ * function predicate( v ) {
1358
+ * return v > 0;
1359
+ * }
1360
+ *
1361
+ * var x = [ 0, 1, 0, 1, 1 ];
1362
+ *
1363
+ * var n = ns.countIf( x, predicate );
1364
+ * // returns 3
1365
+ */
1366
+ countIf : typeof countIf ;
1367
+
1346
1368
/**
1347
1369
* Counts the number of elements in an array that are equal to a specified value.
1348
1370
*
@@ -2418,6 +2440,43 @@ interface Namespace {
2418
2440
*/
2419
2441
indexOf : typeof indexOf ;
2420
2442
2443
+ /**
2444
+ * Returns a string created by joining array elements using a specified separator.
2445
+ *
2446
+ * @param x - input array
2447
+ * @param separator - separator element
2448
+ * @returns string
2449
+ *
2450
+ * @example
2451
+ * var x = [ 1, 2, 3 ];
2452
+ *
2453
+ * var out = ns.join( x, ',' );
2454
+ * // returns '1,2,3'
2455
+ *
2456
+ * @example
2457
+ * var x = [ 1, 2, 3, 4, 5, 6 ];
2458
+ *
2459
+ * var out = ns.join( x, '-' );
2460
+ * // returns '1-2-3-4-5-6'
2461
+ *
2462
+ * @example
2463
+ * var Float64Array = require( '@stdlib/array/float64' );
2464
+ *
2465
+ * var x = new Float64Array( [ 1.0, 2.0, 3.0 ] );
2466
+ *
2467
+ * var out = ns.join( x, ',' );
2468
+ * // returns '1,2,3'
2469
+ *
2470
+ * @example
2471
+ * var Complex128Array = require( '@stdlib/array/complex128' );
2472
+ *
2473
+ * var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
2474
+ *
2475
+ * var out = ns.join( x, ',' );
2476
+ * // returns '1 + 2i,3 + 4i,5 + 6i'
2477
+ */
2478
+ join : typeof join ;
2479
+
2421
2480
/**
2422
2481
* Returns the last element of an array-like object.
2423
2482
*
0 commit comments