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
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { ArrayLike } from '@stdlib/types/array';
* @param value - input value
* @param searchValue - search value
* @param position - position at which to start searching for `searchValue` (default: 0)
* @throws second argument must be a primitive string primitive when the first argument is a string
* @throws second argument must be a string primitive when the first argument is a string
* @returns boolean indicating whether one value contains another
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,18 @@
}

/**
* Returns a boolean indicating whether an object has a nested key path.
* Tests whether an object has a nested key path.
*
* @param value - value to test
* @returns boolean indicating whether an object has a nested property
*
* @example
* var obj = { 'a': { 'b': { 'c': 'd' } } };
* var bool = deepHasOwnProp( obj, 'a' );
* var has = deepHasOwnProp.factory( 'a.b.c' );
* var bool = has( obj );
* // returns true
*/
type HasFunction = ( value: any ) => boolean;

Check warning on line 43 in lib/node_modules/@stdlib/assert/deep-has-own-property/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Interface for testing whether an object contains a nested key path.
Expand Down Expand Up @@ -93,7 +95,7 @@
* });
* // returns true
*/
( value: any, path: string | Array<string>, options?: Options ): boolean;

Check warning on line 98 in lib/node_modules/@stdlib/assert/deep-has-own-property/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Returns a function which tests whether an object has a nested key path.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,18 @@
}

/**
* Returns a boolean indicating whether an object has a nested key path, either own or inherited.
* Tests whether an object has a nested key path, either own or inherited.
*
* @param value - value to test
* @returns boolean indicating whether an object has a nested property
*
* @example
* var obj = { 'a': { 'b': { 'c': 'd' } } };
* var bool = deepHasProp( obj, 'a' );
* var has = deepHasProp.factory( 'a.b.c' );
* var bool = has( obj );
* // returns true
*/
type HasFunction = ( value: any ) => boolean;

Check warning on line 43 in lib/node_modules/@stdlib/assert/deep-has-property/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Interface for testing whether an object contains a nested key path.
Expand Down Expand Up @@ -102,7 +104,7 @@
* });
* // returns true
*/
( value: any, path: string | Array<string>, options?: Options ): boolean;

Check warning on line 107 in lib/node_modules/@stdlib/assert/deep-has-property/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Returns a function which tests whether an object has a nested key path, either own or inherited.
Expand All @@ -114,9 +116,12 @@
* @returns function which tests whether an object has a nested key path
*
* @example
* var obj = { 'a': { 'b': { 'c': 'd' } } };
* var has = deepHasProp.factory( 'a/b/c', {
* 'sep': '/'
* });
* var bool = has( obj );
* // returns true
*/
factory( path: string | Array<string>, options?: Options ): HasFunction;
}
Expand Down
20 changes: 1 addition & 19 deletions lib/node_modules/@stdlib/assert/is-bigint/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* var bool = isBigInt( {} );
* // returns false
*/
( value: any ): value is bigint | BigInt;

Check warning on line 47 in lib/node_modules/@stdlib/assert/is-bigint/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Tests if a value is a BigInt primitive.
Expand All @@ -68,7 +68,7 @@
* var bool = isBigInt.isPrimitive( {} );
* // returns false
*/
isPrimitive( value: any ): value is bigint;

Check warning on line 71 in lib/node_modules/@stdlib/assert/is-bigint/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Tests if a value is a BigInt object.
Expand All @@ -92,7 +92,7 @@
* var bool = isBigInt.isObject( {} );
* // returns false
*/
isObject( value: any ): value is BigInt;

Check warning on line 95 in lib/node_modules/@stdlib/assert/is-bigint/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type
}

/**
Expand All @@ -104,36 +104,18 @@
* @example
* var BigInt = require( '@stdlib/bigint/ctor' );
*
* var bool = isBigInt.isPrimitive( BigInt( '1' ) );
* var bool = isBigInt( BigInt( '1' ) );
* // returns true
*
* @example
* var BigInt = require( '@stdlib/bigint/ctor' );
*
* var bool = isBigInt.isPrimitive( Object( BigInt( '1' ) ) );
* // returns false
*
* @example
* var BigInt = require( '@stdlib/bigint/ctor' );
*
* var bool = isBigInt.isPrimitive( BigInt( '1' ) );
* // returns true
*
* @example
* var BigInt = require( '@stdlib/bigint/ctor' );
*
* var bool = isBigInt.isPrimitive( Object( BigInt( '1' ) ) );
* // returns false
*
* @example
* var BigInt = require( '@stdlib/bigint/ctor' );
*
* var bool = isBigInt.isObject( BigInt( '1' ) );
* // returns false
*
* @example
* var BigInt = require( '@stdlib/bigint/ctor' );
*
* var bool = isBigInt.isObject( Object( BigInt( '1' ) ) );
* // returns true
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* Tests if a value is an array-like object of booleans.
*
* @param value - value to test
* @returns boolean indicating whether value is an array-like object of booleans
* @returns boolean indicating whether value is an array-like object of booleans
*
* @example
* var bool = isBooleanArray( [ true, false, true ] );
Expand All @@ -36,7 +36,7 @@
* var bool = isBooleanArray( [ true, 'abc', false ] );
* // returns false
*/
( value: any ): value is Array<boolean|Boolean>;

Check warning on line 39 in lib/node_modules/@stdlib/assert/is-boolean-array/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Tests if a value is an array-like object containing only boolean primitives.
Expand All @@ -54,7 +54,7 @@
* var bool = isBooleanArray.primitives( [ false, new Boolean( true ) ] );
* // returns false
*/
primitives( value: any ): value is Array<boolean>;

Check warning on line 57 in lib/node_modules/@stdlib/assert/is-boolean-array/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type

/**
* Tests if a value is an array-like object containing only Boolean objects.
Expand All @@ -74,7 +74,7 @@
* var bool = isBooleanArray.objects( [ new Boolean( false ), true ] );
* // returns false
*/
objects( value: any ): value is Array<Boolean>;

Check warning on line 77 in lib/node_modules/@stdlib/assert/is-boolean-array/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected any. Specify a different type
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ interface IsIntegerArray {
* @example
* var bool = isIntegerArray( [ -3.0, '3.0' ] );
* // returns false
*
* @example
* var bool = isIntegerArray.primitives( [ -1.0, 0.0, 5.0 ] );
* // returns true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*
* @example
* var bool = isIterableLike( [] );
* // returns <boolean>
* // returns true
*
* @example
* var bool = isIterableLike( {} );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
* @returns boolean indicating whether a value is a string in kebab case
*
* @example
* var bool = isKebabcase( `beep-boop` );
* var bool = isKebabcase( 'beep-boop' );
* // returns true
*
* @example
* var bool = isKebabcase( `Beep-boop` );
* var bool = isKebabcase( 'Beep-boop' );
* // returns false
*
* @example
* var bool = isKebabcase( `BEEP_BOOP` );
* var bool = isKebabcase( 'BEEP_BOOP' );
* // returns false
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* - According to the Gregorian calendar, every year that is exactly divisible by `4` is a leap year, except those years which are also divisible by `100` and not by `400` (e.g., `1900`).
*
* @param value - input value
* @returns boolean whether a value corresponds to a leap year
* @returns boolean indicating whether a value corresponds to a leap year
*
* @example
* var bool = isLeapYear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ interface IsNaNArray {
*
* @example
* var bool = isNaNArray.objects( [ NaN, NaN, NaN ] );
* // returns false
*/
objects( value: any ): value is ArrayLike<Number>;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ interface IsNonNegativeFinite {
/**
* Tests if a value is a nonnegative finite number.
*
* @param {*} value - value to test
* @returns {boolean} boolean indicating whether value is a nonnegative finite number
* @param value - value to test
* @returns boolean indicating whether value is a nonnegative finite number
*
* @example
* var bool = isNonNegativeFinite( 5.0 );
Expand Down Expand Up @@ -57,8 +57,8 @@ interface IsNonNegativeFinite {
/**
* Tests if a value is a number primitive having a nonnegative finite value.
*
* @param {*} value - value to test
* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative finite value
* @param value - value to test
* @returns boolean indicating if a value is a number primitive having a nonnegative finite value
*
* @example
* var bool = isNonNegativeFinite.isPrimitive( 3.0 );
Expand All @@ -79,10 +79,10 @@ interface IsNonNegativeFinite {
isPrimitive( value: any ): boolean;

/**
* Tests if a value is a finite number object having a nonnegative value.
* Tests if a value is a number object having a nonnegative finite value.
*
* @param {*} value - value to test
* @returns {boolean} boolean indicating if a value is a number object having a nonnegative finite number value
* @param value - value to test
* @returns boolean indicating if a value is a number object having a nonnegative finite number value
*
* @example
* var bool = isNonNegativeFinite.isObject( 3.0 );
Expand All @@ -106,8 +106,8 @@ interface IsNonNegativeFinite {
/**
* Tests if a value is a nonnegative finite number.
*
* @param {*} value - value to test
* @returns {boolean} boolean indicating whether value is a nonnegative finite number
* @param value - value to test
* @returns boolean indicating whether value is a nonnegative finite number
*
* @example
* var bool = isNonNegativeFinite( 5.0 );
Expand All @@ -133,7 +133,6 @@ interface IsNonNegativeFinite {
* var bool = isNonNegativeFinite( null );
* // returns false
*/

declare var isNonNegativeFinite: IsNonNegativeFinite;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ interface IsNonPositiveFinite {
* Tests if a value is a number object having a nonpositive finite value.
*
* @param value - value to test
* @returns boolean indicating if a value is a number object having a nonpositive number value
* @returns boolean indicating if a value is a number object having a nonpositive finite number value
*
* @example
* var bool = isNonPositiveFinite.isObject( -3.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ interface IsNonPositiveNumberArray {
( value: any ): value is ArrayLike<number | Number>;

/**
* Tests if a value is an array-like object containing only nonpositive primitive integer values.
* Tests if a value is an array-like object containing only nonpositive primitive number values.
*
* @param value - value to test
* @returns boolean indicating whether value is an array-like object containing only nonpositive primitive integer values
* @returns boolean indicating whether value is an array-like object containing only nonpositive primitive number values
*
* @example
* var bool = isNonPositiveNumberArray.primitives( [ -1.0, -10.0 ] );
Expand All @@ -59,10 +59,10 @@ interface IsNonPositiveNumberArray {
primitives( value: any ): value is ArrayLike<number>;

/**
* Tests if a value is an array-like object containing only number objects having nonpositive integer values.
* Tests if a value is an array-like object containing only number objects having nonpositive number values.
*
* @param value - value to test
* @returns boolean indicating whether value is an array-like object containing only number objects having nonpositive integer values
* @returns boolean indicating whether value is an array-like object containing only number objects having nonpositive number values
*
* @example
* var bool = isNonPositiveNumberArray.objects( [ new Number(-1.0), new Number(-10.0) ] );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ interface IsNumberArray {
* @example
* var bool = isNumberArray( [ -3.0, '3.0' ] );
* // returns false
*
* @example
* var bool = isNumberArray.primitives( [ -1.0, 0.0, 5.0 ] );
* // returns true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ interface IsPositiveFinite {
*
* @example
* var bool = isPositiveFinite.isPrimitive( 1.0/0.0 );
* // returns true
* // returns false
*
* @example
* var bool = isPositiveFinite.isPrimitive( new Number( 3.0 ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
interface IsProbabilityArray {
/**
* Test if a value is an array-like object containing only probabilities.
* Tests if a value is an array-like object containing only probabilities.
*
* @param value - value to test
* @returns boolean indicating whether value is an array-like object containing only probabilities
Expand Down Expand Up @@ -72,10 +72,10 @@ interface IsProbabilityArray {
}

/**
* Test if a value is an array-like object containing only probabilities.
* Tests if a value is an array-like object containing only probabilities.
*
* @param value - value to test
* @returns boolean indicating whether value is a positive integer
* @returns boolean indicating whether value is an array-like object containing only probabilities
*
* @example
* var bool = isProbabilityArray( [ 0.3, new Number(0.3) ] );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* @param value - value to test
* @param property - property to test
* @returns boolean indicating if an object property is readable
* @returns boolean indicating if an object property is readable
*
* @example
* var defineProperty = require( '@stdlib/utils/define-property' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
/**
* Tests if two arguments are both typed-array-like objects and have the same values.
*
* ## Notes
*
* - The function differs from the `===` operator in that the function treats `-0` and `+0` as distinct and `NaNs` as the same.
*
* @param v1 - first input value
* @param v2 - second input value
* @returns boolean indicating whether the two arguments are both typed-array-like objects with the same values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
* var bool = isStartcase( 'Beep Boop' );
* // returns true
*
* bool = isStartcase( 'beep boop' );
* @example
* var bool = isStartcase( 'beep boop' );
* // returns false
*
* bool = isStartcase( 'Beep and Boop' );
* @example
* var bool = isStartcase( 'Beep and Boop' );
* // returns false
*/
declare function isStartcase( value: any ): boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface IsSymbolArray {
* - In pre-ES2015 environments, the function always returns `false`.
*
* @param value - value to test
* @returns boolean indicating whether value is an array of strings
* @returns boolean indicating whether value is an array-like object containing only symbols
*
* @example
* var bool = isSymbolArray( [ Symbol( 'abc' ), Symbol( 'def' ) ] );
Expand All @@ -50,7 +50,7 @@ interface IsSymbolArray {
* - In pre-ES2015 environments, the function always returns `false`.
*
* @param value - value to test
* @returns boolean indicating whether value is an array containing only string primitives
* @returns boolean indicating whether value is an array-like object containing only symbol primitives
*
* @example
* var bool = isSymbolArray.primitives( [ Symbol( 'abc' ), Symbol( 'def' ) ] );
Expand Down Expand Up @@ -92,7 +92,7 @@ interface IsSymbolArray {
* - In pre-ES2015 environments, the function always returns `false`.
*
* @param value - value to test
* @returns boolean indicating whether value is an array of strings
* @returns boolean indicating whether value is an array-like object containing only symbols
*
* @example
* var bool = isSymbolArray( [ Symbol( 'abc' ), Symbol( 'def' ) ] );
Expand Down
20 changes: 1 addition & 19 deletions lib/node_modules/@stdlib/assert/is-symbol/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,36 +104,18 @@ interface IsSymbol {
* @example
* var Symbol = require( '@stdlib/symbol/ctor' );
*
* var bool = isSymbol.isPrimitive( Symbol( 'beep' ) );
* var bool = isSymbol( Symbol( 'beep' ) );
* // returns true
*
* @example
* var Symbol = require( '@stdlib/symbol/ctor' );
*
* var bool = isSymbol.isPrimitive( Object( Symbol( 'beep' ) ) );
* // returns false
*
* @example
* var Symbol = require( '@stdlib/symbol/ctor' );
*
* var bool = isSymbol.isPrimitive( Symbol( 'beep' ) );
* // returns true
*
* @example
* var Symbol = require( '@stdlib/symbol/ctor' );
*
* var bool = isSymbol.isPrimitive( Object( Symbol( 'beep' ) ) );
* // returns false
*
* @example
* var Symbol = require( '@stdlib/symbol/ctor' );
*
* var bool = isSymbol.isObject( Symbol( 'beep' ) );
* // returns false
*
* @example
* var Symbol = require( '@stdlib/symbol/ctor' );
*
* var bool = isSymbol.isObject( Object( Symbol( 'beep' ) ) );
* // returns true
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* Tests if a value is `undefined` or `null`.
*
* @param value - value to test
* @returns boolean indicating whether value is undefined
* @returns boolean indicating whether value is undefined or null
*
* @example
* var bool = isUndefinedOrNull( undefined );
Expand Down
Loading