Skip to content
Merged
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
59 changes: 59 additions & 0 deletions lib/node_modules/@stdlib/array/base/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import cartesianSquare = require( '@stdlib/array/base/cartesian-square' );
import copy = require( '@stdlib/array/base/copy' );
import copyIndexed = require( '@stdlib/array/base/copy-indexed' );
import countFalsy = require( '@stdlib/array/base/count-falsy' );
import countIf = require( '@stdlib/array/base/count-if' );
import countSameValue = require( '@stdlib/array/base/count-same-value' );
import countSameValueZero = require( '@stdlib/array/base/count-same-value-zero' );
import countTruthy = require( '@stdlib/array/base/count-truthy' );
Expand Down Expand Up @@ -115,6 +116,7 @@ import groupValues = require( '@stdlib/array/base/group-values' );
import groupValuesBy = require( '@stdlib/array/base/group-values-by' );
import incrspace = require( '@stdlib/array/base/incrspace' );
import indexOf = require( '@stdlib/array/base/index-of' );
import join = require( '@stdlib/array/base/join' );
import last = require( '@stdlib/array/base/last' );
import lastIndexOf = require( '@stdlib/array/base/last-index-of' );
import linspace = require( '@stdlib/array/base/linspace' );
Expand Down Expand Up @@ -1343,6 +1345,26 @@ interface Namespace {
*/
countFalsy: typeof countFalsy;

/**
* Counts the number of elements in an array which pass a test implemented by a predicate function.
*
* @param x - input array
* @param predicate - predicate function
* @param thisArg - predicate function execution context
* @returns result
*
* @example
* function predicate( v ) {
* return v > 0;
* }
*
* var x = [ 0, 1, 0, 1, 1 ];
*
* var n = ns.countIf( x, predicate );
* // returns 3
*/
countIf: typeof countIf;

/**
* Counts the number of elements in an array that are equal to a specified value.
*
Expand Down Expand Up @@ -2418,6 +2440,43 @@ interface Namespace {
*/
indexOf: typeof indexOf;

/**
* Returns a string created by joining array elements using a specified separator.
*
* @param x - input array
* @param separator - separator element
* @returns string
*
* @example
* var x = [ 1, 2, 3 ];
*
* var out = ns.join( x, ',' );
* // returns '1,2,3'
*
* @example
* var x = [ 1, 2, 3, 4, 5, 6 ];
*
* var out = ns.join( x, '-' );
* // returns '1-2-3-4-5-6'
*
* @example
* var Float64Array = require( '@stdlib/array/float64' );
*
* var x = new Float64Array( [ 1.0, 2.0, 3.0 ] );
*
* var out = ns.join( x, ',' );
* // returns '1,2,3'
*
* @example
* var Complex128Array = require( '@stdlib/array/complex128' );
*
* var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
*
* var out = ns.join( x, ',' );
* // returns '1 + 2i,3 + 4i,5 + 6i'
*/
join: typeof join;

/**
* Returns the last element of an array-like object.
*
Expand Down