Skip to content

Commit 25e7a6e

Browse files
feat: update namespace TypeScript declarations
PR-URL: #2146 Signed-off-by: stdlib-bot <[email protected]> Co-authored-by: Philipp Burckhardt <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]>
1 parent 22aaef5 commit 25e7a6e

File tree

1 file changed

+59
-0
lines changed
  • lib/node_modules/@stdlib/array/base/docs/types

1 file changed

+59
-0
lines changed

lib/node_modules/@stdlib/array/base/docs/types/index.d.ts

+59
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ import cartesianSquare = require( '@stdlib/array/base/cartesian-square' );
6464
import copy = require( '@stdlib/array/base/copy' );
6565
import copyIndexed = require( '@stdlib/array/base/copy-indexed' );
6666
import countFalsy = require( '@stdlib/array/base/count-falsy' );
67+
import countIf = require( '@stdlib/array/base/count-if' );
6768
import countSameValue = require( '@stdlib/array/base/count-same-value' );
6869
import countSameValueZero = require( '@stdlib/array/base/count-same-value-zero' );
6970
import countTruthy = require( '@stdlib/array/base/count-truthy' );
@@ -115,6 +116,7 @@ import groupValues = require( '@stdlib/array/base/group-values' );
115116
import groupValuesBy = require( '@stdlib/array/base/group-values-by' );
116117
import incrspace = require( '@stdlib/array/base/incrspace' );
117118
import indexOf = require( '@stdlib/array/base/index-of' );
119+
import join = require( '@stdlib/array/base/join' );
118120
import last = require( '@stdlib/array/base/last' );
119121
import lastIndexOf = require( '@stdlib/array/base/last-index-of' );
120122
import linspace = require( '@stdlib/array/base/linspace' );
@@ -1343,6 +1345,26 @@ interface Namespace {
13431345
*/
13441346
countFalsy: typeof countFalsy;
13451347

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+
13461368
/**
13471369
* Counts the number of elements in an array that are equal to a specified value.
13481370
*
@@ -2418,6 +2440,43 @@ interface Namespace {
24182440
*/
24192441
indexOf: typeof indexOf;
24202442

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+
24212480
/**
24222481
* Returns the last element of an array-like object.
24232482
*

0 commit comments

Comments
 (0)