From bb78b73817c0e4119c041040a04b928ea428385b Mon Sep 17 00:00:00 2001 From: kgryte Date: Tue, 11 Oct 2022 21:38:37 +0000 Subject: [PATCH] Update namespace TypeScript declarations --- .../@stdlib/array/base/docs/types/test.ts | 4 +- .../@stdlib/array/docs/types/test.ts | 4 +- .../@stdlib/assert/docs/types/index.d.ts | 60 +++ .../@stdlib/assert/docs/types/test.ts | 4 +- .../@stdlib/assert/tools/docs/types/test.ts | 4 +- .../@stdlib/bigint/docs/types/test.ts | 4 +- .../@stdlib/blas/base/docs/types/test.ts | 4 +- .../@stdlib/blas/docs/types/test.ts | 4 +- .../@stdlib/blas/ext/base/docs/types/test.ts | 4 +- .../@stdlib/blas/ext/docs/types/test.ts | 4 +- .../@stdlib/boolean/docs/types/index.d.ts | 28 +- .../@stdlib/buffer/docs/types/index.d.ts | 12 +- .../@stdlib/buffer/docs/types/test.ts | 4 +- .../@stdlib/cli/docs/types/test.ts | 4 +- .../@stdlib/complex/docs/types/test.ts | 4 +- .../constants/array/docs/types/test.ts | 4 +- .../constants/complex128/docs/types/test.ts | 4 +- .../constants/complex64/docs/types/test.ts | 4 +- .../@stdlib/constants/docs/types/test.ts | 4 +- .../constants/float16/docs/types/test.ts | 4 +- .../constants/float32/docs/types/test.ts | 4 +- .../constants/float64/docs/types/test.ts | 4 +- .../constants/int16/docs/types/test.ts | 4 +- .../constants/int32/docs/types/test.ts | 4 +- .../@stdlib/constants/int8/docs/types/test.ts | 4 +- .../@stdlib/constants/path/docs/types/test.ts | 4 +- .../@stdlib/constants/time/docs/types/test.ts | 4 +- .../constants/uint16/docs/types/test.ts | 4 +- .../constants/uint32/docs/types/test.ts | 4 +- .../constants/uint8/docs/types/test.ts | 4 +- .../constants/unicode/docs/types/test.ts | 4 +- .../@stdlib/error/docs/types/test.ts | 4 +- .../@stdlib/error/tools/docs/types/test.ts | 4 +- .../@stdlib/fs/docs/types/test.ts | 4 +- .../@stdlib/function/docs/types/index.d.ts | 50 +- .../@stdlib/iter/docs/types/test.ts | 4 +- .../math/base/assert/docs/types/test.ts | 4 +- .../@stdlib/math/base/docs/types/test.ts | 4 +- .../@stdlib/math/base/napi/docs/types/test.ts | 4 +- .../@stdlib/math/base/ops/docs/types/test.ts | 4 +- .../math/base/special/docs/types/index.d.ts | 54 +++ .../math/base/special/docs/types/test.ts | 4 +- .../math/base/special/fast/docs/types/test.ts | 4 +- .../math/base/tools/docs/types/test.ts | 4 +- .../math/base/utils/docs/types/test.ts | 4 +- .../@stdlib/math/docs/types/test.ts | 4 +- .../@stdlib/math/iter/docs/types/test.ts | 4 +- .../@stdlib/math/iter/ops/docs/types/test.ts | 4 +- .../math/iter/sequences/docs/types/test.ts | 4 +- .../math/iter/special/docs/types/test.ts | 4 +- .../math/iter/tools/docs/types/test.ts | 4 +- .../math/iter/utils/docs/types/test.ts | 4 +- .../@stdlib/math/special/docs/types/test.ts | 4 +- .../@stdlib/math/strided/docs/types/test.ts | 4 +- .../math/strided/ops/docs/types/test.ts | 4 +- .../math/strided/special/docs/types/test.ts | 4 +- .../@stdlib/math/tools/docs/types/test.ts | 4 +- .../@stdlib/ml/docs/types/test.ts | 4 +- .../@stdlib/ml/incr/docs/types/test.ts | 4 +- .../ndarray/base/assert/docs/types/test.ts | 4 +- .../@stdlib/ndarray/base/docs/types/test.ts | 4 +- .../@stdlib/ndarray/docs/types/test.ts | 4 +- .../@stdlib/net/docs/types/test.ts | 4 +- .../@stdlib/nlp/docs/types/test.ts | 4 +- .../@stdlib/number/docs/types/test.ts | 4 +- .../number/float32/base/docs/types/test.ts | 4 +- .../@stdlib/number/float32/docs/types/test.ts | 4 +- .../number/float64/base/docs/types/index.d.ts | 26 +- .../number/float64/base/docs/types/test.ts | 4 +- .../@stdlib/number/float64/docs/types/test.ts | 4 +- .../number/int32/base/docs/types/test.ts | 4 +- .../@stdlib/number/int32/docs/types/test.ts | 4 +- .../number/uint16/base/docs/types/test.ts | 4 +- .../@stdlib/number/uint16/docs/types/test.ts | 4 +- .../number/uint32/base/docs/types/test.ts | 4 +- .../@stdlib/number/uint32/docs/types/test.ts | 4 +- .../number/uint8/base/docs/types/test.ts | 4 +- .../@stdlib/number/uint8/docs/types/test.ts | 4 +- .../@stdlib/object/docs/types/index.d.ts | 32 +- .../@stdlib/os/docs/types/test.ts | 4 +- .../@stdlib/process/docs/types/test.ts | 4 +- .../@stdlib/proxy/docs/types/test.ts | 4 +- .../@stdlib/random/base/docs/types/test.ts | 4 +- .../@stdlib/random/docs/types/test.ts | 4 +- .../@stdlib/random/iter/docs/types/test.ts | 4 +- .../@stdlib/random/streams/docs/types/test.ts | 4 +- .../@stdlib/regexp/docs/types/index.d.ts | 69 ++- .../@stdlib/regexp/docs/types/test.ts | 4 +- .../@stdlib/simulate/docs/types/test.ts | 4 +- .../@stdlib/simulate/iter/docs/types/test.ts | 4 +- .../base/dists/arcsine/docs/types/test.ts | 4 +- .../base/dists/bernoulli/docs/types/test.ts | 4 +- .../stats/base/dists/beta/docs/types/test.ts | 4 +- .../base/dists/betaprime/docs/types/test.ts | 4 +- .../base/dists/binomial/docs/types/test.ts | 4 +- .../base/dists/cauchy/docs/types/test.ts | 4 +- .../stats/base/dists/chi/docs/types/test.ts | 4 +- .../base/dists/chisquare/docs/types/test.ts | 4 +- .../base/dists/cosine/docs/types/test.ts | 4 +- .../base/dists/degenerate/docs/types/test.ts | 4 +- .../dists/discrete-uniform/docs/types/test.ts | 4 +- .../stats/base/dists/docs/types/index.d.ts | 6 + .../stats/base/dists/docs/types/test.ts | 4 +- .../base/dists/erlang/docs/types/test.ts | 4 +- .../base/dists/exponential/docs/types/test.ts | 4 +- .../stats/base/dists/f/docs/types/test.ts | 4 +- .../base/dists/frechet/docs/types/test.ts | 4 +- .../stats/base/dists/gamma/docs/types/test.ts | 4 +- .../base/dists/geometric/docs/types/test.ts | 4 +- .../base/dists/gumbel/docs/types/test.ts | 4 +- .../dists/hypergeometric/docs/types/test.ts | 4 +- .../base/dists/invgamma/docs/types/test.ts | 4 +- .../base/dists/kumaraswamy/docs/types/test.ts | 4 +- .../base/dists/laplace/docs/types/test.ts | 4 +- .../stats/base/dists/levy/docs/types/test.ts | 4 +- .../base/dists/logistic/docs/types/test.ts | 4 +- .../base/dists/lognormal/docs/types/test.ts | 4 +- .../negative-binomial/docs/types/test.ts | 4 +- .../base/dists/normal/docs/types/test.ts | 4 +- .../dists/pareto-type1/docs/types/test.ts | 4 +- .../base/dists/poisson/docs/types/test.ts | 4 +- .../base/dists/rayleigh/docs/types/test.ts | 4 +- .../base/dists/signrank/docs/types/test.ts | 4 +- .../studentized-range/docs/types/index.d.ts | 58 ++- .../studentized-range/docs/types/test.ts | 4 +- .../stats/base/dists/t/docs/types/test.ts | 4 +- .../base/dists/triangular/docs/types/test.ts | 4 +- .../dists/truncated-normal/docs/types/test.ts | 4 +- .../base/dists/uniform/docs/types/test.ts | 4 +- .../base/dists/weibull/docs/types/test.ts | 4 +- .../@stdlib/stats/base/docs/types/test.ts | 4 +- .../@stdlib/stats/docs/types/test.ts | 4 +- .../@stdlib/stats/incr/docs/types/test.ts | 4 +- .../@stdlib/stats/iter/docs/types/test.ts | 4 +- .../@stdlib/streams/docs/types/test.ts | 4 +- .../@stdlib/streams/node/docs/types/test.ts | 4 +- .../@stdlib/strided/base/docs/types/test.ts | 4 +- .../@stdlib/strided/docs/types/test.ts | 4 +- .../@stdlib/string/base/docs/types/index.d.ts | 431 ++++++++++++++++++ .../@stdlib/string/base/docs/types/test.ts | 4 +- .../@stdlib/string/docs/types/index.d.ts | 82 +++- .../@stdlib/string/docs/types/test.ts | 4 +- .../@stdlib/string/tools/docs/types/test.ts | 4 +- .../@stdlib/symbol/docs/types/test.ts | 4 +- .../@stdlib/time/docs/types/test.ts | 4 +- .../@stdlib/utils/async/docs/types/test.ts | 4 +- .../@stdlib/utils/docs/types/index.d.ts | 73 +++ .../@stdlib/utils/docs/types/test.ts | 4 +- .../utils/dsv/base/docs/types/index.d.ts | 4 +- .../@stdlib/utils/dsv/base/docs/types/test.ts | 4 +- .../@stdlib/utils/dsv/docs/types/index.d.ts | 7 +- .../@stdlib/utils/dsv/docs/types/test.ts | 4 +- 152 files changed, 1215 insertions(+), 325 deletions(-) diff --git a/lib/node_modules/@stdlib/array/base/docs/types/test.ts b/lib/node_modules/@stdlib/array/base/docs/types/test.ts index 43ef6ea9744f..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/array/base/docs/types/test.ts +++ b/lib/node_modules/@stdlib/array/base/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import base = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - base; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/array/docs/types/test.ts b/lib/node_modules/@stdlib/array/docs/types/test.ts index 714a99acf206..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/array/docs/types/test.ts +++ b/lib/node_modules/@stdlib/array/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import array = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - array; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/assert/docs/types/index.d.ts b/lib/node_modules/@stdlib/assert/docs/types/index.d.ts index bd8a4fac90cf..b644f7a6298d 100644 --- a/lib/node_modules/@stdlib/assert/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/assert/docs/types/index.d.ts @@ -113,11 +113,13 @@ import isComposite = require( '@stdlib/assert/is-composite' ); import isConfigurableProperty = require( '@stdlib/assert/is-configurable-property' ); import isConfigurablePropertyIn = require( '@stdlib/assert/is-configurable-property-in' ); import isCubeNumber = require( '@stdlib/assert/is-cube-number' ); +import isCurrentYear = require( '@stdlib/assert/is-current-year' ); import IS_DARWIN = require( '@stdlib/assert/is-darwin' ); import isDataProperty = require( '@stdlib/assert/is-data-property' ); import isDataPropertyIn = require( '@stdlib/assert/is-data-property-in' ); import isDataView = require( '@stdlib/assert/is-dataview' ); import isDateObject = require( '@stdlib/assert/is-date-object' ); +import isDateObjectArray = require( '@stdlib/assert/is-date-object-array' ); import isDigitString = require( '@stdlib/assert/is-digit-string' ); import IS_DOCKER = require( '@stdlib/assert/is-docker' ); import IS_ELECTRON = require( '@stdlib/assert/is-electron' ); @@ -244,6 +246,7 @@ import isSameNativeClass = require( '@stdlib/assert/is-same-native-class' ); import isSameType = require( '@stdlib/assert/is-same-type' ); import isSameValue = require( '@stdlib/assert/is-same-value' ); import isSameValueZero = require( '@stdlib/assert/is-same-value-zero' ); +import isSemVer = require( '@stdlib/assert/is-semver' ); import isSharedArrayBuffer = require( '@stdlib/assert/is-sharedarraybuffer' ); import isSkewCentrosymmetricMatrix = require( '@stdlib/assert/is-skew-centrosymmetric-matrix' ); import isSkewPersymmetricMatrix = require( '@stdlib/assert/is-skew-persymmetric-matrix' ); @@ -1615,10 +1618,14 @@ interface Namespace { * // returns true * * @example + * var Boolean = require( `@stdlib/boolean/ctor` ); + * * var bool = ns.isBoolean.isPrimitive( new Boolean( true ) ); * // returns false * * @example + * var Boolean = require( `@stdlib/boolean/ctor` ); + * * var bool = ns.isBoolean.isObject( new Boolean( false ) ); * // returns true */ @@ -1643,6 +1650,8 @@ interface Namespace { * // returns true * * @example + * var Boolean = require( `@stdlib/boolean/ctor` ); + * * var bool = ns.isBooleanArray.objects( [ new Boolean( false ), new Boolean( true ) ] ); * // returns true */ @@ -2188,6 +2197,31 @@ interface Namespace { */ isCubeNumber: typeof isCubeNumber; + /** + * Tests if a value is either an integer equal to the current year or a `Date` object representing the current year. + * + * @param value - value to test + * @returns boolean indicating whether a provided value is the current year + * + * @example + * var bool = ns.isCurrentYear( new Date() ); + * // returns true + * + * @example + * var currentYear = require( `@stdlib/time/current-year` ); + * var bool = ns.isCurrentYear( currentYear() ); + * // returns true + * + * @example + * var bool = ns.isCurrentYear( 2021 ); + * // returns false + * + * @example + * var bool = ns.isCurrentYear( null ); + * // returns false + */ + isCurrentYear: typeof isCurrentYear; + /** * Boolean indicating if the current process is running on Darwin. * @@ -2301,6 +2335,8 @@ interface Namespace { */ isDateObject: typeof isDateObject; + isDateObjectArray: typeof isDateObjectArray; + /** * Tests whether a string contains only numeric digits. * @@ -5428,6 +5464,30 @@ interface Namespace { */ isSameValueZero: typeof isSameValueZero; + /** + * Tests if a value is a semantic version string. + * + * @param value - value to test + * @returns boolean indicating whether a provided value is a semantic version string + * + * @example + * var bool = ns.isSemVer( '1.0.0' ); + * // returns true + * + * @example + * var bool = ns.isSemVer( '1.0.0-alpha.1' ); + * // returns true + * + * @example + * var bool = ns.isSemVer( '0.1' ); + * // returns false + * + * @example + * var bool = ns.isSemVer( null ); + * // returns false + */ + isSemVer: typeof isSemVer; + /** * Tests if a value is a `SharedArrayBuffer`. * diff --git a/lib/node_modules/@stdlib/assert/docs/types/test.ts b/lib/node_modules/@stdlib/assert/docs/types/test.ts index ea40c37b93a6..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/assert/docs/types/test.ts +++ b/lib/node_modules/@stdlib/assert/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import assert = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - assert; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/assert/tools/docs/types/test.ts b/lib/node_modules/@stdlib/assert/tools/docs/types/test.ts index e9b94b1eae39..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/assert/tools/docs/types/test.ts +++ b/lib/node_modules/@stdlib/assert/tools/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import tools = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - tools; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/bigint/docs/types/test.ts b/lib/node_modules/@stdlib/bigint/docs/types/test.ts index a14fa6043282..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/bigint/docs/types/test.ts +++ b/lib/node_modules/@stdlib/bigint/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import bigint = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - bigint; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/blas/base/docs/types/test.ts b/lib/node_modules/@stdlib/blas/base/docs/types/test.ts index 43ef6ea9744f..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/blas/base/docs/types/test.ts +++ b/lib/node_modules/@stdlib/blas/base/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import base = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - base; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/blas/docs/types/test.ts b/lib/node_modules/@stdlib/blas/docs/types/test.ts index d31124ae0fb8..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/blas/docs/types/test.ts +++ b/lib/node_modules/@stdlib/blas/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import blas = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - blas; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/blas/ext/base/docs/types/test.ts b/lib/node_modules/@stdlib/blas/ext/base/docs/types/test.ts index 43ef6ea9744f..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/docs/types/test.ts +++ b/lib/node_modules/@stdlib/blas/ext/base/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import base = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - base; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/blas/ext/docs/types/test.ts b/lib/node_modules/@stdlib/blas/ext/docs/types/test.ts index 9da8ffdcb6d5..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/blas/ext/docs/types/test.ts +++ b/lib/node_modules/@stdlib/blas/ext/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import ext = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - ext; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/boolean/docs/types/index.d.ts b/lib/node_modules/@stdlib/boolean/docs/types/index.d.ts index ec6977c76a3d..25858029e017 100644 --- a/lib/node_modules/@stdlib/boolean/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/boolean/docs/types/index.d.ts @@ -28,7 +28,33 @@ import Boolean = require( '@stdlib/boolean/ctor' ); */ interface Namespace { /** - * TODO + * Returns a boolean. + * + * ## Notes + * + * - When invoked without `new`, + * + * - if provided `false`, `null`, `undefined`, `-0`, `0`, `NaN`, or an empty string, the function returns `false`. + * - if provided any other value, including an empty object, an empty array, the string `'false'`, or a `Boolean` object (including a `Boolean` object whose value is `false`), the function returns `true`. + * + * - When invoked with `new`, the constructor returns a `Boolean` object, which is an object wrapper for a primitive boolean value. The value of the returned `Boolean` object follows the same conversion semantics as when the constructor is invoked without `new`. + * + * @param value - input value + * @returns boolean or boolean object + * + * @example + * var b = ns.Boolean( null ); + * // returns false + * + * b = ns.Boolean( [] ); + * // returns true + * + * b = ns.Boolean( {} ); + * // returns true + * + * @example + * var b = new ns.Boolean( false ); + * // returns */ Boolean: typeof Boolean; } diff --git a/lib/node_modules/@stdlib/buffer/docs/types/index.d.ts b/lib/node_modules/@stdlib/buffer/docs/types/index.d.ts index 5e08b978f49c..219586cfcee5 100644 --- a/lib/node_modules/@stdlib/buffer/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/buffer/docs/types/index.d.ts @@ -27,8 +27,8 @@ import array2buffer = require( '@stdlib/buffer/from-array' ); import arraybuffer2buffer = require( '@stdlib/buffer/from-arraybuffer' ); import copyBuffer = require( '@stdlib/buffer/from-buffer' ); import string2buffer = require( '@stdlib/buffer/from-string' ); -import reviver = require( '@stdlib/buffer/reviver' ); -import toJSON = require( '@stdlib/buffer/to-json' ); +import reviveBuffer = require( '@stdlib/buffer/reviver' ); +import buffer2json = require( '@stdlib/buffer/to-json' ); /** * Interface describing the `buffer` namespace. @@ -157,10 +157,10 @@ interface Namespace { * * var str = '{"type":"Buffer","data":[5,3]}'; * - * var buf = parseJSON( str, ns.reviver ); + * var buf = parseJSON( str, ns.reviveBuffer ); * // returns [ 5, 3 ] */ - reviver: typeof reviver; + reviveBuffer: typeof reviveBuffer; /** * Returns a JSON representation of a `Buffer`. @@ -175,10 +175,10 @@ interface Namespace { * var buf = array2buffer( [ 1, 2 ] ); * // returns * - * var json = ns.toJSON( buf ); + * var json = ns.buffer2json( buf ); * // returns { 'type': 'Buffer', 'data': [ 1, 2 ] } */ - toJSON: typeof toJSON; + buffer2json: typeof buffer2json; } /** diff --git a/lib/node_modules/@stdlib/buffer/docs/types/test.ts b/lib/node_modules/@stdlib/buffer/docs/types/test.ts index 905b50415391..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/buffer/docs/types/test.ts +++ b/lib/node_modules/@stdlib/buffer/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import buffer = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - buffer; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/cli/docs/types/test.ts b/lib/node_modules/@stdlib/cli/docs/types/test.ts index 060fdcd808f8..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/cli/docs/types/test.ts +++ b/lib/node_modules/@stdlib/cli/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import cli = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - cli; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/complex/docs/types/test.ts b/lib/node_modules/@stdlib/complex/docs/types/test.ts index 0cf5d7ce10f4..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/complex/docs/types/test.ts +++ b/lib/node_modules/@stdlib/complex/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import complex = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - complex; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/constants/array/docs/types/test.ts b/lib/node_modules/@stdlib/constants/array/docs/types/test.ts index 714a99acf206..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/constants/array/docs/types/test.ts +++ b/lib/node_modules/@stdlib/constants/array/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import array = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - array; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/constants/complex128/docs/types/test.ts b/lib/node_modules/@stdlib/constants/complex128/docs/types/test.ts index 862cfddb35b7..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/constants/complex128/docs/types/test.ts +++ b/lib/node_modules/@stdlib/constants/complex128/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import complex128 = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - complex128; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/constants/complex64/docs/types/test.ts b/lib/node_modules/@stdlib/constants/complex64/docs/types/test.ts index b381d3cf74c5..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/constants/complex64/docs/types/test.ts +++ b/lib/node_modules/@stdlib/constants/complex64/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import complex64 = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - complex64; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/constants/docs/types/test.ts b/lib/node_modules/@stdlib/constants/docs/types/test.ts index 2d024e93fe8c..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/constants/docs/types/test.ts +++ b/lib/node_modules/@stdlib/constants/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import constants = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - constants; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/constants/float16/docs/types/test.ts b/lib/node_modules/@stdlib/constants/float16/docs/types/test.ts index a43179be484d..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/constants/float16/docs/types/test.ts +++ b/lib/node_modules/@stdlib/constants/float16/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import float16 = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - float16; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/constants/float32/docs/types/test.ts b/lib/node_modules/@stdlib/constants/float32/docs/types/test.ts index 08b8d47cb4f7..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/constants/float32/docs/types/test.ts +++ b/lib/node_modules/@stdlib/constants/float32/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import float32 = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - float32; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/constants/float64/docs/types/test.ts b/lib/node_modules/@stdlib/constants/float64/docs/types/test.ts index 443bccd29342..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/constants/float64/docs/types/test.ts +++ b/lib/node_modules/@stdlib/constants/float64/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import float64 = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - float64; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/constants/int16/docs/types/test.ts b/lib/node_modules/@stdlib/constants/int16/docs/types/test.ts index 4d1a0406b568..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/constants/int16/docs/types/test.ts +++ b/lib/node_modules/@stdlib/constants/int16/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import int16 = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - int16; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/constants/int32/docs/types/test.ts b/lib/node_modules/@stdlib/constants/int32/docs/types/test.ts index f22a685c94ac..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/constants/int32/docs/types/test.ts +++ b/lib/node_modules/@stdlib/constants/int32/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import int32 = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - int32; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/constants/int8/docs/types/test.ts b/lib/node_modules/@stdlib/constants/int8/docs/types/test.ts index 5914240c4d95..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/constants/int8/docs/types/test.ts +++ b/lib/node_modules/@stdlib/constants/int8/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import int8 = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - int8; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/constants/path/docs/types/test.ts b/lib/node_modules/@stdlib/constants/path/docs/types/test.ts index acd2174b839e..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/constants/path/docs/types/test.ts +++ b/lib/node_modules/@stdlib/constants/path/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import path = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - path; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/constants/time/docs/types/test.ts b/lib/node_modules/@stdlib/constants/time/docs/types/test.ts index 0ac0780fa51a..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/constants/time/docs/types/test.ts +++ b/lib/node_modules/@stdlib/constants/time/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import time = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - time; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/constants/uint16/docs/types/test.ts b/lib/node_modules/@stdlib/constants/uint16/docs/types/test.ts index 046722981ed3..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/constants/uint16/docs/types/test.ts +++ b/lib/node_modules/@stdlib/constants/uint16/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import uint16 = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - uint16; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/constants/uint32/docs/types/test.ts b/lib/node_modules/@stdlib/constants/uint32/docs/types/test.ts index b9d627c71ab1..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/constants/uint32/docs/types/test.ts +++ b/lib/node_modules/@stdlib/constants/uint32/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import uint32 = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - uint32; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/constants/uint8/docs/types/test.ts b/lib/node_modules/@stdlib/constants/uint8/docs/types/test.ts index 0109472d4210..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/constants/uint8/docs/types/test.ts +++ b/lib/node_modules/@stdlib/constants/uint8/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import uint8 = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - uint8; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/constants/unicode/docs/types/test.ts b/lib/node_modules/@stdlib/constants/unicode/docs/types/test.ts index 5077295a9219..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/constants/unicode/docs/types/test.ts +++ b/lib/node_modules/@stdlib/constants/unicode/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import unicode = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - unicode; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/error/docs/types/test.ts b/lib/node_modules/@stdlib/error/docs/types/test.ts index be8b177b82e7..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/error/docs/types/test.ts +++ b/lib/node_modules/@stdlib/error/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import error = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - error; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/error/tools/docs/types/test.ts b/lib/node_modules/@stdlib/error/tools/docs/types/test.ts index e0f8b8045cd0..ed1e2f4151a3 100644 --- a/lib/node_modules/@stdlib/error/tools/docs/types/test.ts +++ b/lib/node_modules/@stdlib/error/tools/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import tools = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - tools; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/fs/docs/types/test.ts b/lib/node_modules/@stdlib/fs/docs/types/test.ts index a30718001886..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/fs/docs/types/test.ts +++ b/lib/node_modules/@stdlib/fs/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import fs = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - fs; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/function/docs/types/index.d.ts b/lib/node_modules/@stdlib/function/docs/types/index.d.ts index b39113be61e5..0dce71c67723 100644 --- a/lib/node_modules/@stdlib/function/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/function/docs/types/index.d.ts @@ -22,15 +22,63 @@ /* tslint:disable:max-file-line-count */ import Function = require( '@stdlib/function/ctor' ); +import function2string = require( '@stdlib/function/to-string' ); /** * Interface describing the `function` namespace. */ interface Namespace { /** - * TODO + * Returns a Function object. + * + * ## Notes + * + * - Argument names must be strings corresponding to valid JavaScript parameters (i.e., a plain identifier, or, in environments supporting such parameters, a rest parameter or destructured parameter, optionally with a default). + * - Creating `Function` objects with the `Function` constructor is less efficient than declaring a function via a function expression or a function statement. + * - The `Function` constructor can be invoked without the `new` operator (using `new` and not using `new` both return a new `Function` object). + * - The `Function` constructor creates functions which execute in the **global scope**. Hence, created functions **cannot** access variables local to the scope in which functions were created. + * + * @param argNames - parameter names + * @param body - function body + * @returns function + * + * @example + * var add = new ns.Function( 'x', 'y', 'return x + y' ); + * + * var v = add( 1, 2 ); + * // returns 3 */ Function: typeof Function; + + /** + * Returns a string representing the source code of a provided function. + * + * ## Notes + * + * - If called on built-in functions, functions created by `Function.prototype.bind()`, or other non-JavaScript functions, the function returns a "native" function string similar to the following: + * + * ```text + * "function foo() { [native code] }" + * ``` + * + * For intrinsic object methods and functions, `foo` is the initial name of the function. + * + * - If called on a function created by the `Function` constructor, the function returns the source code of a synthesized function declaration having the name "anonymous" and using the provided parameters and function body. + * + * - Starting in ES2018, the ECMAScript specification requires that the returned string contain the exact same source code as it was declared, including any whitespace and/or comments. If the host is unable to access the source code, the specification requires that the returned string be the native function string. + * + * @param fcn - input function + * @returns string representing function source code + * + * @example + * function add( x, y ) { + * return x + y; + * } + * + * var str = ns.function2string( add ); + * // e.g., returns 'function add( x, y ) {\n return x + y;\n}' + */ + function2string: typeof function2string; } /** diff --git a/lib/node_modules/@stdlib/iter/docs/types/test.ts b/lib/node_modules/@stdlib/iter/docs/types/test.ts index b5f4d6972f51..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/iter/docs/types/test.ts +++ b/lib/node_modules/@stdlib/iter/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import iter = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - iter; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/base/assert/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/assert/docs/types/test.ts index ea40c37b93a6..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/base/assert/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/base/assert/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import assert = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - assert; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/base/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/docs/types/test.ts index 43ef6ea9744f..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/base/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/base/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import base = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - base; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/base/napi/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/napi/docs/types/test.ts index fb0fcbb82b08..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/base/napi/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/base/napi/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import napi = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - napi; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/base/ops/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/ops/docs/types/test.ts index 61a7f0a04313..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/base/ops/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/base/ops/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import ops = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - ops; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/base/special/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/docs/types/index.d.ts index 471050f28478..ef82fa8ef674 100644 --- a/lib/node_modules/@stdlib/math/base/special/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/base/special/docs/types/index.d.ts @@ -35,6 +35,7 @@ import acsc = require( '@stdlib/math/base/special/acsc' ); import acsch = require( '@stdlib/math/base/special/acsch' ); import ahavercos = require( '@stdlib/math/base/special/ahavercos' ); import ahaversin = require( '@stdlib/math/base/special/ahaversin' ); +import asec = require( '@stdlib/math/base/special/asec' ); import asech = require( '@stdlib/math/base/special/asech' ); import asin = require( '@stdlib/math/base/special/asin' ); import asinh = require( '@stdlib/math/base/special/asinh' ); @@ -222,6 +223,7 @@ import spence = require( '@stdlib/math/base/special/spence' ); import sqrt = require( '@stdlib/math/base/special/sqrt' ); import sqrt1pm1 = require( '@stdlib/math/base/special/sqrt1pm1' ); import sqrtf = require( '@stdlib/math/base/special/sqrtf' ); +import sqrtpi = require( '@stdlib/math/base/special/sqrtpi' ); import tan = require( '@stdlib/math/base/special/tan' ); import tanh = require( '@stdlib/math/base/special/tanh' ); import tribonacci = require( '@stdlib/math/base/special/tribonacci' ); @@ -595,6 +597,26 @@ interface Namespace { */ ahaversin: typeof ahaversin; + /** + * Computes the inverse (arc) secant of a number. + * + * @param x - input value + * @returns inverse (arc) secant + * + * @example + * var v = ns.asec( 1.0 ); + * // returns 0.0 + * + * @example + * var v = ns.asec( 2.0 ); + * // returns ~1.0472 + * + * @example + * var v = ns.asec( NaN ); + * // returns NaN + */ + asec: typeof asec; + /** * Computes the hyperbolic arcsecant of a number. * @@ -5933,6 +5955,38 @@ interface Namespace { */ sqrtf: typeof sqrtf; + /** + * Computes the principal square root of the product of π and a positive number. + * + * ## Notes + * + * - For `x < 0`, the principal square root is not defined. + * + * @param x - input value + * @returns result + * + * @example + * var v = ns.sqrtpi( 4.0 ); + * // returns ~3.5449 + * + * @example + * var v = ns.sqrtpi( 10.0 ); + * // returns ~5.60499 + * + * @example + * var v = ns.sqrtpi( 0.0 ); + * // returns 0.0 + * + * @example + * var v = ns.sqrtpi( -4.0 ); + * // returns NaN + * + * @example + * var v = ns.sqrtpi( NaN ); + * // returns NaN + */ + sqrtpi: typeof sqrtpi; + /** * Evaluates the tangent of a number. * diff --git a/lib/node_modules/@stdlib/math/base/special/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/special/docs/types/test.ts index a119f7a5ada1..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/base/special/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/base/special/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import special = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - special; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/base/special/fast/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/special/fast/docs/types/test.ts index 0d5537a73417..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/base/special/fast/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/base/special/fast/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import fast = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - fast; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/base/tools/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/tools/docs/types/test.ts index e9b94b1eae39..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/base/tools/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/base/tools/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import tools = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - tools; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/base/utils/docs/types/test.ts b/lib/node_modules/@stdlib/math/base/utils/docs/types/test.ts index a192bc0b0c1c..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/base/utils/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/base/utils/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import utils = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - utils; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/docs/types/test.ts b/lib/node_modules/@stdlib/math/docs/types/test.ts index a903b1c816c6..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import math = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - math; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/iter/docs/types/test.ts b/lib/node_modules/@stdlib/math/iter/docs/types/test.ts index b5f4d6972f51..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/iter/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/iter/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import iter = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - iter; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/iter/ops/docs/types/test.ts b/lib/node_modules/@stdlib/math/iter/ops/docs/types/test.ts index 61a7f0a04313..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/iter/ops/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/iter/ops/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import ops = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - ops; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/iter/sequences/docs/types/test.ts b/lib/node_modules/@stdlib/math/iter/sequences/docs/types/test.ts index b7b135b23129..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/iter/sequences/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/iter/sequences/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import sequences = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - sequences; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/iter/special/docs/types/test.ts b/lib/node_modules/@stdlib/math/iter/special/docs/types/test.ts index a119f7a5ada1..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/iter/special/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/iter/special/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import special = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - special; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/iter/tools/docs/types/test.ts b/lib/node_modules/@stdlib/math/iter/tools/docs/types/test.ts index e9b94b1eae39..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/iter/tools/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/iter/tools/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import tools = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - tools; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/iter/utils/docs/types/test.ts b/lib/node_modules/@stdlib/math/iter/utils/docs/types/test.ts index 38a4fcb7e02a..ed1e2f4151a3 100644 --- a/lib/node_modules/@stdlib/math/iter/utils/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/iter/utils/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import utils = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - utils; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/special/docs/types/test.ts b/lib/node_modules/@stdlib/math/special/docs/types/test.ts index a119f7a5ada1..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/special/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/special/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import special = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - special; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/strided/docs/types/test.ts b/lib/node_modules/@stdlib/math/strided/docs/types/test.ts index 99964dc4b9dd..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/strided/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/strided/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import strided = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - strided; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/strided/ops/docs/types/test.ts b/lib/node_modules/@stdlib/math/strided/ops/docs/types/test.ts index 61a7f0a04313..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/strided/ops/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/strided/ops/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import ops = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - ops; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/strided/special/docs/types/test.ts b/lib/node_modules/@stdlib/math/strided/special/docs/types/test.ts index a119f7a5ada1..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/strided/special/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/strided/special/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import special = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - special; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/math/tools/docs/types/test.ts b/lib/node_modules/@stdlib/math/tools/docs/types/test.ts index e9b94b1eae39..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/math/tools/docs/types/test.ts +++ b/lib/node_modules/@stdlib/math/tools/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import tools = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - tools; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/ml/docs/types/test.ts b/lib/node_modules/@stdlib/ml/docs/types/test.ts index 1f2ae9a88697..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/ml/docs/types/test.ts +++ b/lib/node_modules/@stdlib/ml/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import ml = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - ml; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/ml/incr/docs/types/test.ts b/lib/node_modules/@stdlib/ml/incr/docs/types/test.ts index 6dcc33aa259a..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/ml/incr/docs/types/test.ts +++ b/lib/node_modules/@stdlib/ml/incr/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import incr = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - incr; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/ndarray/base/assert/docs/types/test.ts b/lib/node_modules/@stdlib/ndarray/base/assert/docs/types/test.ts index ea40c37b93a6..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/ndarray/base/assert/docs/types/test.ts +++ b/lib/node_modules/@stdlib/ndarray/base/assert/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import assert = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - assert; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/ndarray/base/docs/types/test.ts b/lib/node_modules/@stdlib/ndarray/base/docs/types/test.ts index 43ef6ea9744f..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/ndarray/base/docs/types/test.ts +++ b/lib/node_modules/@stdlib/ndarray/base/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import base = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - base; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/ndarray/docs/types/test.ts b/lib/node_modules/@stdlib/ndarray/docs/types/test.ts index 23cb79c91b44..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/ndarray/docs/types/test.ts +++ b/lib/node_modules/@stdlib/ndarray/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import ndarray = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - ndarray; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/net/docs/types/test.ts b/lib/node_modules/@stdlib/net/docs/types/test.ts index 408d97d2e589..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/net/docs/types/test.ts +++ b/lib/node_modules/@stdlib/net/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import net = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - net; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/nlp/docs/types/test.ts b/lib/node_modules/@stdlib/nlp/docs/types/test.ts index 5ed2d712cb94..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/nlp/docs/types/test.ts +++ b/lib/node_modules/@stdlib/nlp/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import nlp = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - nlp; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/number/docs/types/test.ts b/lib/node_modules/@stdlib/number/docs/types/test.ts index 611ed880891d..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/number/docs/types/test.ts +++ b/lib/node_modules/@stdlib/number/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import number = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - number; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/number/float32/base/docs/types/test.ts b/lib/node_modules/@stdlib/number/float32/base/docs/types/test.ts index 43ef6ea9744f..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/number/float32/base/docs/types/test.ts +++ b/lib/node_modules/@stdlib/number/float32/base/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import base = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - base; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/number/float32/docs/types/test.ts b/lib/node_modules/@stdlib/number/float32/docs/types/test.ts index 08b8d47cb4f7..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/number/float32/docs/types/test.ts +++ b/lib/node_modules/@stdlib/number/float32/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import float32 = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - float32; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/number/float64/base/docs/types/index.d.ts b/lib/node_modules/@stdlib/number/float64/base/docs/types/index.d.ts index 7694dfe77b7f..eb5490fdb327 100644 --- a/lib/node_modules/@stdlib/number/float64/base/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/number/float64/base/docs/types/index.d.ts @@ -249,36 +249,20 @@ interface Namespace { /** * Returns a normal number `y` and exponent `exp` satisfying \\(x = y \cdot 2^\mathrm{exp}\\). * + * The first element of the returned array corresponds to `y` and the second to `exp`. + * * @param x - input value * @returns output array * * @example * var pow = require( `@stdlib/math/base/special/pow` ); - * * var out = ns.normalize( 3.14e-319 ); - * // returns [ 1.4141234400356668e-303, -52 ] + * // returns [ 1.4141234400356668e-303, -52 ] * * var y = out[ 0 ]; - * var exp = out[ 1 ]; - * - * var bool = ( y*pow(2.0,exp) === 3.14e-319 ); + * var exponent = out[ 1 ]; + * var bool = ( y*pow(2.0, exponent) === 3.14e-319 ); * // returns true - * - * @example - * var out = ns.normalize( 0.0 ); - * // returns [ 0.0, 0 ] - * - * @example - * var out = ns.normalize( Infinity ); - * // returns [ Infinity, 0 ] - * - * @example - * var out = ns.normalize( -Infinity ); - * // returns [ -Infinity, 0 ] - * - * @example - * var out = ns.normalize( NaN ); - * // returns [ NaN, 0 ] */ normalize: typeof normalize; diff --git a/lib/node_modules/@stdlib/number/float64/base/docs/types/test.ts b/lib/node_modules/@stdlib/number/float64/base/docs/types/test.ts index 43ef6ea9744f..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/number/float64/base/docs/types/test.ts +++ b/lib/node_modules/@stdlib/number/float64/base/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import base = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - base; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/number/float64/docs/types/test.ts b/lib/node_modules/@stdlib/number/float64/docs/types/test.ts index 443bccd29342..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/number/float64/docs/types/test.ts +++ b/lib/node_modules/@stdlib/number/float64/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import float64 = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - float64; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/number/int32/base/docs/types/test.ts b/lib/node_modules/@stdlib/number/int32/base/docs/types/test.ts index 43ef6ea9744f..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/number/int32/base/docs/types/test.ts +++ b/lib/node_modules/@stdlib/number/int32/base/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import base = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - base; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/number/int32/docs/types/test.ts b/lib/node_modules/@stdlib/number/int32/docs/types/test.ts index f22a685c94ac..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/number/int32/docs/types/test.ts +++ b/lib/node_modules/@stdlib/number/int32/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import int32 = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - int32; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/number/uint16/base/docs/types/test.ts b/lib/node_modules/@stdlib/number/uint16/base/docs/types/test.ts index 43ef6ea9744f..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/number/uint16/base/docs/types/test.ts +++ b/lib/node_modules/@stdlib/number/uint16/base/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import base = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - base; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/number/uint16/docs/types/test.ts b/lib/node_modules/@stdlib/number/uint16/docs/types/test.ts index 046722981ed3..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/number/uint16/docs/types/test.ts +++ b/lib/node_modules/@stdlib/number/uint16/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import uint16 = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - uint16; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/number/uint32/base/docs/types/test.ts b/lib/node_modules/@stdlib/number/uint32/base/docs/types/test.ts index 43ef6ea9744f..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/number/uint32/base/docs/types/test.ts +++ b/lib/node_modules/@stdlib/number/uint32/base/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import base = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - base; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/number/uint32/docs/types/test.ts b/lib/node_modules/@stdlib/number/uint32/docs/types/test.ts index b9d627c71ab1..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/number/uint32/docs/types/test.ts +++ b/lib/node_modules/@stdlib/number/uint32/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import uint32 = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - uint32; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/number/uint8/base/docs/types/test.ts b/lib/node_modules/@stdlib/number/uint8/base/docs/types/test.ts index 43ef6ea9744f..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/number/uint8/base/docs/types/test.ts +++ b/lib/node_modules/@stdlib/number/uint8/base/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import base = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - base; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/number/uint8/docs/types/test.ts b/lib/node_modules/@stdlib/number/uint8/docs/types/test.ts index 0109472d4210..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/number/uint8/docs/types/test.ts +++ b/lib/node_modules/@stdlib/number/uint8/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import uint8 = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - uint8; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/object/docs/types/index.d.ts b/lib/node_modules/@stdlib/object/docs/types/index.d.ts index edfacdd85dad..8c05c1c0d98c 100644 --- a/lib/node_modules/@stdlib/object/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/object/docs/types/index.d.ts @@ -28,7 +28,37 @@ import Object = require( '@stdlib/object/ctor' ); */ interface Namespace { /** - * TODO + * Returns an object. + * + * ## Notes + * + * - If provided `null` or `undefined`, the function returns an empty object. + * - If provided an existing object, the function returns the input value unchanged. + * - Otherwise, if provided any other value (e.g., a number, string, etc), the function will return an object of the corresponding type. + * + * @param value - input value + * @returns object + * + * @example + * var o = new ns.Object( null ); + * // returns {} + * + * @example + * var o = new ns.Object( 5.0 ); + * // returns + * + * @example + * var o = new ns.Object( 'beep' ); + * // returns + * + * @example + * var o1 = {}; + * + * var o2 = new ns.Object( o1 ); + * // returns {} + * + * var bool = ( o1 === o2 ); + * // returns true */ Object: typeof Object; } diff --git a/lib/node_modules/@stdlib/os/docs/types/test.ts b/lib/node_modules/@stdlib/os/docs/types/test.ts index a39ec159747f..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/os/docs/types/test.ts +++ b/lib/node_modules/@stdlib/os/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import os = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - os; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/process/docs/types/test.ts b/lib/node_modules/@stdlib/process/docs/types/test.ts index 587632d0432c..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/process/docs/types/test.ts +++ b/lib/node_modules/@stdlib/process/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import process = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - process; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/proxy/docs/types/test.ts b/lib/node_modules/@stdlib/proxy/docs/types/test.ts index e812b80759d2..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/proxy/docs/types/test.ts +++ b/lib/node_modules/@stdlib/proxy/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import proxy = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - proxy; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/random/base/docs/types/test.ts b/lib/node_modules/@stdlib/random/base/docs/types/test.ts index 43ef6ea9744f..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/random/base/docs/types/test.ts +++ b/lib/node_modules/@stdlib/random/base/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import base = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - base; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/random/docs/types/test.ts b/lib/node_modules/@stdlib/random/docs/types/test.ts index 038dbf86c1b1..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/random/docs/types/test.ts +++ b/lib/node_modules/@stdlib/random/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import random = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - random; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/random/iter/docs/types/test.ts b/lib/node_modules/@stdlib/random/iter/docs/types/test.ts index b5f4d6972f51..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/random/iter/docs/types/test.ts +++ b/lib/node_modules/@stdlib/random/iter/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import iter = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - iter; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/random/streams/docs/types/test.ts b/lib/node_modules/@stdlib/random/streams/docs/types/test.ts index edc0a34bb2aa..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/random/streams/docs/types/test.ts +++ b/lib/node_modules/@stdlib/random/streams/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import streams = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - streams; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/regexp/docs/types/index.d.ts b/lib/node_modules/@stdlib/regexp/docs/types/index.d.ts index 66db0c610b81..82b2e978f4d0 100644 --- a/lib/node_modules/@stdlib/regexp/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/regexp/docs/types/index.d.ts @@ -40,6 +40,9 @@ import reFilenameWindows = require( '@stdlib/regexp/filename-windows' ); import reFunctionName = require( '@stdlib/regexp/function-name' ); import reNativeFunction = require( '@stdlib/regexp/native-function' ); import reRegExp = require( '@stdlib/regexp/regexp' ); +import reviveRegExp = require( '@stdlib/regexp/reviver' ); +import reSemVer = require( '@stdlib/regexp/semver' ); +import regexp2json = require( '@stdlib/regexp/to-json' ); import reUncPath = require( '@stdlib/regexp/unc-path' ); import reUtf16SurrogatePair = require( '@stdlib/regexp/utf16-surrogate-pair' ); import reUtf16UnpairedSurrogate = require( '@stdlib/regexp/utf16-unpaired-surrogate' ); @@ -171,7 +174,7 @@ interface Namespace { * @example * var RE_DIRNAME = ns.reDirname( 'win32' ); * var dir = RE_DIRNAME.exec( 'C:\\foo\\bar\\index.js' )[ 1 ]; - * // returns 'C:\\foo\\bar' + * // returns 'C:\foo\bar' */ reDirname: typeof reDirname; @@ -199,11 +202,11 @@ interface Namespace { * @example * var RE_DIRNAME_WINDOWS = ns.reDirnameWindows(); * var dir = RE_DIRNAME_WINDOWS.exec( 'foo\\bar\\index.js' )[ 1 ]; - * // returns 'foo\\bar' + * // returns 'foo\bar' * * @example * var dir = ns.reDirnameWindows.REGEXP.exec( 'foo\\bar\\index.js' )[ 1 ]; - * // returns 'foo\\bar' + * // returns 'foo\bar' */ reDirnameWindows: typeof reDirnameWindows; @@ -421,6 +424,66 @@ interface Namespace { */ reRegExp: typeof reRegExp; + /** + * Revives a JSON-serialized regular expression. + * + * @param key - key + * @param value - value + * @returns value + * + * @example + * var parseJSON = require( `@stdlib/utils/parse-json` ); + * + * var str = '{"type":"RegExp","pattern":"ab+c","flags":""}'; + * + * var re = parseJSON( str, ns.reviveRegExp ); + * // returns + * + * @example + * var parseJSON = require( `@stdlib/utils/parse-json` ); + * + * var str = '{"beep":"boop"}'; + * + * var o = parseJSON( str, ns.reviveRegExp ); + * // returns { 'beep': 'boop' } + */ + reviveRegExp: typeof reviveRegExp; + + /** + * Returns a regular expression to match a semantic version string. + * + * @returns regular expression + * + * @example + * var RE_SEMVER = ns.reSemVer(); + * // returns + * + * var bool = RE_SEMVER.test( '1.0.0' ); + * // returns true + * + * bool = RE_SEMVER.test( '1.0.0-alpha.1' ); + * // returns true + * + * bool = RE_SEMVER.test( 'abc' ); + * // returns false + * + * bool = RE_SEMVER.test( '1.0.0-alpha.1+build.1' ); + * // returns true + */ + reSemVer: typeof reSemVer; + + /** + * Returns a JSON representation of a regular expression. + * + * @param re - regular expression to serialize + * @returns JSON representation + * + * @example + * var json = ns.regexp2json( /ab+c/ ); + * // returns {...} + */ + regexp2json: typeof regexp2json; + /** * Returns a regular expression to parse a UNC path. * diff --git a/lib/node_modules/@stdlib/regexp/docs/types/test.ts b/lib/node_modules/@stdlib/regexp/docs/types/test.ts index 98aed5d06264..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/regexp/docs/types/test.ts +++ b/lib/node_modules/@stdlib/regexp/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import regexp = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - regexp; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/simulate/docs/types/test.ts b/lib/node_modules/@stdlib/simulate/docs/types/test.ts index b171d8f44922..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/simulate/docs/types/test.ts +++ b/lib/node_modules/@stdlib/simulate/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import simulate = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - simulate; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/simulate/iter/docs/types/test.ts b/lib/node_modules/@stdlib/simulate/iter/docs/types/test.ts index b5f4d6972f51..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/simulate/iter/docs/types/test.ts +++ b/lib/node_modules/@stdlib/simulate/iter/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import iter = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - iter; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/arcsine/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/arcsine/docs/types/test.ts index be97ecd1fca1..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/arcsine/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/arcsine/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import arcsine = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - arcsine; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/bernoulli/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/bernoulli/docs/types/test.ts index bfd2654bb943..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/bernoulli/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/bernoulli/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import bernoulli = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - bernoulli; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/beta/docs/types/test.ts index f4304a7aa0bd..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import beta = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - beta; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/betaprime/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/betaprime/docs/types/test.ts index 3273d13c4b6a..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/betaprime/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/betaprime/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import betaprime = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - betaprime; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/binomial/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/binomial/docs/types/test.ts index 6e35999127d9..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/binomial/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/binomial/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import binomial = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - binomial; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/cauchy/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/cauchy/docs/types/test.ts index 1087bc449d59..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/cauchy/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/cauchy/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import cauchy = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - cauchy; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/chi/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/chi/docs/types/test.ts index 70fdacafc202..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/chi/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/chi/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import chi = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - chi; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/chisquare/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/chisquare/docs/types/test.ts index 6d4368fdf876..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/chisquare/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/chisquare/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import chisquare = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - chisquare; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/cosine/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/cosine/docs/types/test.ts index 7a48a4ce5ffb..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/cosine/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/cosine/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import cosine = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - cosine; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/degenerate/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/degenerate/docs/types/test.ts index 6aa081d35344..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/degenerate/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/degenerate/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import degenerate = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - degenerate; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/docs/types/test.ts index 1a62a84bdd97..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import discreteUniform = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - discreteUniform; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/base/dists/docs/types/index.d.ts index 696615672d50..98f896faee8b 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/docs/types/index.d.ts @@ -52,6 +52,7 @@ import pareto1 = require( '@stdlib/stats/base/dists/pareto-type1' ); import poisson = require( '@stdlib/stats/base/dists/poisson' ); import rayleigh = require( '@stdlib/stats/base/dists/rayleigh' ); import signrank = require( '@stdlib/stats/base/dists/signrank' ); +import tukey = require( '@stdlib/stats/base/dists/studentized-range' ); import t = require( '@stdlib/stats/base/dists/t' ); import triangular = require( '@stdlib/stats/base/dists/triangular' ); import truncatedNormal = require( '@stdlib/stats/base/dists/truncated-normal' ); @@ -217,6 +218,11 @@ interface Namespace { */ signrank: typeof signrank; + /** + * Studentized range distribution. + */ + tukey: typeof tukey; + /** * Student's t distribution. */ diff --git a/lib/node_modules/@stdlib/stats/base/dists/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/docs/types/test.ts index 32a758959cb3..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import dists = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - dists; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/erlang/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/erlang/docs/types/test.ts index 742d10c5f9b0..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/erlang/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/erlang/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import erlang = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - erlang; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/exponential/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/exponential/docs/types/test.ts index 64bc3ce421e1..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/exponential/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/exponential/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import exponential = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - exponential; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/f/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/f/docs/types/test.ts index 36bbefb631e9..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/f/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/f/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import f = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - f; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/frechet/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/frechet/docs/types/test.ts index 2c7da78ded5c..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/frechet/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/frechet/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import frechet = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - frechet; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/gamma/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/gamma/docs/types/test.ts index dac0264c250b..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/gamma/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/gamma/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import gamma = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - gamma; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/geometric/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/geometric/docs/types/test.ts index 70eee9a3162d..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/geometric/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/geometric/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import geometric = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - geometric; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/gumbel/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/gumbel/docs/types/test.ts index c9198df9f8c1..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/gumbel/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/gumbel/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import gumbel = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - gumbel; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/hypergeometric/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/hypergeometric/docs/types/test.ts index 7f114c2a167c..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/hypergeometric/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/hypergeometric/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import hypergeometric = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - hypergeometric; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/invgamma/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/invgamma/docs/types/test.ts index a6f76e234a14..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/invgamma/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/invgamma/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import invgamma = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - invgamma; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/docs/types/test.ts index 071dbca37f8e..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import kumaraswamy = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - kumaraswamy; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/laplace/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/laplace/docs/types/test.ts index d79ba01a1f72..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/laplace/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/laplace/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import laplace = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - laplace; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/levy/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/levy/docs/types/test.ts index 3f1e912063d9..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/levy/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/levy/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import levy = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - levy; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/logistic/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/logistic/docs/types/test.ts index e31cdcb3d3d4..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/logistic/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/logistic/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import logistic = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - logistic; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/lognormal/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/lognormal/docs/types/test.ts index 33300849e36e..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/lognormal/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/lognormal/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import lognormal = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - lognormal; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/negative-binomial/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/negative-binomial/docs/types/test.ts index f83020af5acc..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/negative-binomial/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/negative-binomial/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import negativeBinomial = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - negativeBinomial; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/normal/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/normal/docs/types/test.ts index 5cc10992b18f..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/normal/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/normal/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import normal = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - normal; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/pareto-type1/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/pareto-type1/docs/types/test.ts index bae4df4f2bd6..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/pareto-type1/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/pareto-type1/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import paretoType1 = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - paretoType1; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/poisson/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/poisson/docs/types/test.ts index 31f38cdbd173..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/poisson/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/poisson/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import poisson = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - poisson; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/rayleigh/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/rayleigh/docs/types/test.ts index a60f2859469c..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/rayleigh/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/rayleigh/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import rayleigh = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - rayleigh; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/signrank/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/signrank/docs/types/test.ts index 02ff2291dde5..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/signrank/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/signrank/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import signrank = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - signrank; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/docs/types/index.d.ts index 22648f83f17e..479b87392b50 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/docs/types/index.d.ts @@ -21,10 +21,66 @@ /* tslint:disable:max-line-length */ /* tslint:disable:max-file-line-count */ +import cdf = require( '@stdlib/stats/base/dists/studentized-range/cdf' ); +import quantile = require( '@stdlib/stats/base/dists/studentized-range/quantile' ); + /** -* Interface describing the distribution namespace. +* Interface describing the `studentized-range` namespace. */ interface Namespace { + /** + * Cumulative distribution function (CDF) of a studentized range distribution. + * + * @param q - quantile of the studentized range + * @param r - sample size for range (same for each group) + * @param v - degrees of freedom + * @param nranges - number of groups whose maximum range is considered (default: 1) + * @returns evaluated CDF + * + * @example + * var y = ns.cdf( 2.0, 0.1 ); + * // returns ~0.611 + * + * y = ns.cdf( 1.0, 2.0 ); + * // returns ~0.789 + * + * y = ns.cdf( -1.0, 4.0 ); + * // returns ~0.187 + * + * var mycdf = ns.cdf.factory( 3.0, 2.0 ); + * y = mycdf( 3.0 ); + * // returns ~0.712 + * + * y = mycdf( 1.0 ); + * // returns ~0.216 + */ + cdf: typeof cdf; + + /** + * Evaluates the quantile function for a studentized range distribution at probability `p` with `r` samples and `v` degrees of freedom. + * + * @param p - input probability + * @param r - sample size for range (same for each group; must be greater than or equal to `2`) + * @param v - degrees of freedom (must be greater than or equal to `2`) + * @param nranges - number of groups whose maximum range is considered (default: 1) + * @returns evaluated quantile function + * + * @example + * var y = ns.quantile( 0.5, 3.0, 2.0 ); + * // returns ~1.908 + * + * y = ns.quantile( 0.1, 3.0, 4.0 ); + * // returns ~0.627 + * + * var myquantile = ns.quantile.factory( 3.0, 3.0 ); + * + * y = myquantile( 0.5 ); + * // returns ~1.791 + * + * y = myquantile( 0.8 ); + * // returns ~3.245 + */ + quantile: typeof quantile; } /** diff --git a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/docs/types/test.ts index 533c14ab0576..ed1e2f4151a3 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import tukey = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - tukey; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/t/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/t/docs/types/test.ts index 067623a700e3..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/t/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/t/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import t = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - t; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/triangular/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/triangular/docs/types/test.ts index 5febd5c3f9fa..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/triangular/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/triangular/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import triangular = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - triangular; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/truncated-normal/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/truncated-normal/docs/types/test.ts index 49af92edd95c..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/truncated-normal/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/truncated-normal/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import truncatedNormal = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - truncatedNormal; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/uniform/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/uniform/docs/types/test.ts index 59cce3a12c55..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/uniform/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/uniform/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import uniform = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - uniform; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/dists/weibull/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/weibull/docs/types/test.ts index 48652b63fce1..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/weibull/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/weibull/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import weibull = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - weibull; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/base/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/docs/types/test.ts index 43ef6ea9744f..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/base/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import base = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - base; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/docs/types/test.ts b/lib/node_modules/@stdlib/stats/docs/types/test.ts index d547e8dbb25a..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import stats = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - stats; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/incr/docs/types/test.ts b/lib/node_modules/@stdlib/stats/incr/docs/types/test.ts index 6dcc33aa259a..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/incr/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/incr/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import incr = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - incr; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/stats/iter/docs/types/test.ts b/lib/node_modules/@stdlib/stats/iter/docs/types/test.ts index b5f4d6972f51..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/stats/iter/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/iter/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import iter = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - iter; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/streams/docs/types/test.ts b/lib/node_modules/@stdlib/streams/docs/types/test.ts index edc0a34bb2aa..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/streams/docs/types/test.ts +++ b/lib/node_modules/@stdlib/streams/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import streams = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - streams; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/streams/node/docs/types/test.ts b/lib/node_modules/@stdlib/streams/node/docs/types/test.ts index e26376466015..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/streams/node/docs/types/test.ts +++ b/lib/node_modules/@stdlib/streams/node/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import node = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - node; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/strided/base/docs/types/test.ts b/lib/node_modules/@stdlib/strided/base/docs/types/test.ts index 43ef6ea9744f..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/strided/base/docs/types/test.ts +++ b/lib/node_modules/@stdlib/strided/base/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import base = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - base; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/strided/docs/types/test.ts b/lib/node_modules/@stdlib/strided/docs/types/test.ts index 99964dc4b9dd..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/strided/docs/types/test.ts +++ b/lib/node_modules/@stdlib/strided/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import strided = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - strided; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/string/base/docs/types/index.d.ts b/lib/node_modules/@stdlib/string/base/docs/types/index.d.ts index 87be38ce8531..0f87056fea6e 100644 --- a/lib/node_modules/@stdlib/string/base/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/string/base/docs/types/index.d.ts @@ -21,13 +21,136 @@ /* tslint:disable:max-line-length */ /* tslint:disable:max-file-line-count */ +import camelcase = require( '@stdlib/string/base/camelcase' ); +import capitalize = require( '@stdlib/string/base/capitalize' ); +import codePointAt = require( '@stdlib/string/base/code-point-at' ); +import constantcase = require( '@stdlib/string/base/constantcase' ); +import endsWith = require( '@stdlib/string/base/ends-with' ); import formatInterpolate = require( '@stdlib/string/base/format-interpolate' ); import formatTokenize = require( '@stdlib/string/base/format-tokenize' ); +import kebabcase = require( '@stdlib/string/base/kebabcase' ); +import lpad = require( '@stdlib/string/base/left-pad' ); +import ltrim = require( '@stdlib/string/base/left-trim' ); +import lowercase = require( '@stdlib/string/base/lowercase' ); +import pascalcase = require( '@stdlib/string/base/pascalcase' ); +import percentEncode = require( '@stdlib/string/base/percent-encode' ); +import repeat = require( '@stdlib/string/base/repeat' ); +import replace = require( '@stdlib/string/base/replace' ); +import rtrim = require( '@stdlib/string/base/right-trim' ); +import snakecase = require( '@stdlib/string/base/snakecase' ); +import startcase = require( '@stdlib/string/base/startcase' ); +import startsWith = require( '@stdlib/string/base/starts-with' ); +import trim = require( '@stdlib/string/base/trim' ); +import uncapitalize = require( '@stdlib/string/base/uncapitalize' ); +import uppercase = require( '@stdlib/string/base/uppercase' ); /** * Interface describing the `base` namespace. */ interface Namespace { + /** + * Converts a string to camel case. + * + * @param str - string to convert + * @returns camel-cased string + * + * @example + * var str = ns.camelcase( 'Hello World!' ); + * // returns 'helloWorld' + * + * @example + * var str = ns.camelcase( 'foo_bar' ); + * // returns 'fooBar' + * + * @example + * var str = ns.camelcase( 'foo-bar' ); + * // returns 'fooBar' + */ + camelcase: typeof camelcase; + + /** + * Capitalizes the first character in a string. + * + * @param str - input string + * @returns capitalized string + * + * @example + * var out = ns.capitalize( 'last man standing' ); + * // returns 'Last man standing' + * + * @example + * var out = ns.capitalize( 'presidential election' ); + * // returns 'Presidential election' + * + * @example + * var out = ns.capitalize( 'javaScript' ); + * // returns 'JavaScript' + * + * @example + * var out = ns.capitalize( 'Hidden Treasures' ); + * // returns 'Hidden Treasures' + */ + capitalize: typeof capitalize; + + /** + * Returns a Unicode code point from a string at specified position. + * + * @param str - input string + * @param idx - position + * @param backward - backward iteration for low surrogates + * @returns code point + * + * @example + * var str = ns.codePointAt( 'अनुच्छेद', 2, false ); + * // returns 2369 + * + * str = ns.codePointAt( '🌷', 1, true ); + * // returns 127799 + */ + codePointAt: typeof codePointAt; + + /** + * Converts a string to constant case. + * + * @param str - string to convert + * @returns constant-cased string + * + * @example + * var str = ns.constantcase( 'beep' ); + * // returns 'BEEP' + * + * @example + * var str = ns.constantcase( 'beep boop' ); + * // returns 'BEEP_BOOP' + * + * @example + * var str = ns.constantcase( 'Hello World!' ); + * // returns 'HELLO_WORLD' + */ + constantcase: typeof constantcase; + + /** + * Tests if a string ends with the characters of another string. + * + * ## Notes + * + * - The last parameter restricts the search to a substring within the input string beginning from the leftmost character. If provided a negative value, `len` indicates to ignore the last `len` characters, and is thus equivalent to `str.length + len`. + * + * @param str - input string + * @param search - search string + * @param len - substring length + * @returns boolean indicating if the input string ends with the search string + * + * @example + * var bool = ns.endsWith( 'To be, or not to be, that is the question.', 'to be', 19 ); + * // returns true + * + * @example + * var bool = ns.endsWith( 'To be, or not to be, that is the question.', 'to be', -23 ); + * // returns true + */ + endsWith: typeof endsWith; + /** * Generates string from a token array by interpolating values. * @@ -54,6 +177,314 @@ interface Namespace { * // returns [ 'Hello ', {...}, '!' ] */ formatTokenize: typeof formatTokenize; + + /** + * Converts a string to kebab case. + * + * @param str - string to convert + * @returns kebab-cased string + * + * @example + * var str = ns.kebabcase( 'fooBar' ); + * // returns 'foo-bar' + * + * @example + * var str = ns.kebabcase( 'foo_bar' ); + * // returns 'foo-bar' + * + * @example + * var str = ns.kebabcase( 'foo-bar' ); + * // returns 'foo-bar' + */ + kebabcase: typeof kebabcase; + + /** + * Left pads a string such that the padded string has a length of at least `len`. + * + * ## Notes + * + * - An output string is not guaranteed to have a length of exactly `len`, but to have a length of at least `len`. To generate a padded string having a length equal to `len`, post-process a padded string by trimming off excess characters. + * + * @param str - string to pad + * @param len - minimum string length + * @param pad - string used to pad + * @returns padded string + * + * @example + * var str = ns.lpad( 'a', 5, ' ' ); + * // returns ' a' + * + * @example + * var str = ns.lpad( 'beep', 10, 'b' ); + * // returns 'bbbbbbbeep' + * + * @example + * var str = ns.lpad( 'boop', 12, 'beep' ); + * // returns 'beepbeepboop' + */ + lpad: typeof lpad; + + /** + * Trims whitespace characters from the beginning of a string. + * + * @param str - input string + * @returns trimmed string + * + * @example + * var out = ns.ltrim( ' Whitespace ' ); + * // returns 'Whitespace ' + * + * @example + * var out = ns.ltrim( '\t\t\tTabs\t\t\t' ); + * // returns 'Tabs\t\t\t' + * + * @example + * var out = ns.ltrim( '\n\n\nNew Lines\n\n\n' ); + * // returns 'New Lines\n\n\n' + */ + ltrim: typeof ltrim; + + /** + * Converts a string to lowercase. + * + * @param str - string to convert + * @returns lowercase string + * + * @example + * var str = ns.lowercase( 'bEEp' ); + * // returns 'beep' + */ + lowercase: typeof lowercase; + + /** + * Converts a string to Pascal case. + * + * @param str - string to convert + * @returns Pascal-cased string + * + * @example + * var str = ns.pascalcase( 'Hello World!' ); + * // returns 'HelloWorld' + * + * @example + * var str = ns.pascalcase( 'foo_bar' ); + * // returns 'FooBar' + * + * @example + * var str = ns.pascalcase( 'foo-bar' ); + * // returns 'FooBar' + */ + pascalcase: typeof pascalcase; + + /** + * Percent-encodes a UTF-16 encoded string according to [RFC 3986][1]. + * + * [1]: https://tools.ietf.org/html/rfc3986#section-2.1 + * + * @param str - string to percent-encode + * @returns percent-encoded string + * + * @example + * var str1 = 'Ladies + Gentlemen'; + * + * var str2 = ns.percentEncode( str1 ); + * // returns 'Ladies%20%2B%20Gentlemen' + */ + percentEncode: typeof percentEncode; + + /** + * Repeats a string `n` times and returns the concatenated result. + * + * @param str - string to repeat + * @param n - number of times to repeat the string + * @returns repeated string + * + * @example + * var str = ns.repeat( 'a', 5 ); + * // returns 'aaaaa' + * + * @example + * var str = ns.repeat( '', 100 ); + * // returns '' + * + * @example + * var str = ns.repeat( 'beep', 0 ); + * // returns '' + */ + repeat: typeof repeat; + + /** + * Replaces search occurrences with a replacement string. + * + * @param str - input string + * @param search - search expression + * @param newval - replacement value or function + * @returns new string containing replacement(s) + * + * @example + * var str = 'Hello World'; + * var out = ns.replace( str, /world/i, 'Mr. President' ); + * // returns 'Hello Mr. President' + * + * @example + * var capitalize = require( `@stdlib/string/base/capitalize` ); + * + * var str = 'Oranges and lemons say the bells of St. Clement\'s'; + * + * function ns.replacer( match, p1 ) { + * return capitalize( p1 ); + * } + * + * var out = ns.replace( str, /([^\s]*)/gi, ns.replacer); + * // returns 'Oranges And Lemons Say The Bells Of St. Clement\'s' + */ + replace: typeof replace; + + /** + * Trims whitespace from the end of a string. + * + * @param str - input string + * @returns trimmed string + * + * @example + * var out = ns.rtrim( ' Whitespace ' ); + * // returns ' Whitespace' + * + * @example + * var out = ns.rtrim( '\t\t\tTabs\t\t\t' ); + * // returns '\t\t\tTabs' + * + * @example + * var out = ns.rtrim( '\n\n\nNew Lines\n\n\n' ); + * // returns '\n\n\nNew Lines' + */ + rtrim: typeof rtrim; + + /** + * Converts a string to snake case. + * + * @param str - string to convert + * @returns snake-cased string + * + * @example + * var str = ns.snakecase( 'fooBar' ); + * // returns 'foo_bar' + * + * @example + * var str = ns.snakecase( 'foo-bar' ); + * // returns 'foo_bar' + * + * @example + * var str = ns.snakecase( 'foo_bar' ); + * // returns 'foo_bar' + */ + snakecase: typeof snakecase; + + /** + * Capitalizes the first letter of each word in an input string. + * + * @param str - string to convert + * @returns start-cased string + * + * @example + * var str = ns.startcase( 'beep boop foo bar' ); + * // returns 'Beep Boop Foo Bar' + */ + startcase: typeof startcase; + + /** + * Tests if a string starts with the characters of another string. + * + * ## Notes + * + * - If provided a negative `position`, the search starting position is resolved relative to the end of the string. For example, if provided the input string `'beep boop'` and a `position` equal to `-2`, the starting position resolves to `7`. + * + * @param str - input string + * @param search - search string + * @param position - position at which to start searching + * @returns boolean indicating if the input string starts with the search string + * + * @example + * var bool = ns.startsWith( 'Remember the story I used to tell you when you were a boy?', 'Remember', 0 ); + * // returns true + * + * @example + * var bool = ns.startsWith( 'Remember the story I used to tell you when you were a boy?', 'Remember, remember', 0 ); + * // returns false + * + * @example + * var bool = ns.startsWith( 'To be, or not to be, that is the question.', 'To be', 0 ); + * // returns true + * + * @example + * var bool = ns.startsWith( 'To be, or not to be, that is the question.', 'to be', 0 ); + * // returns false + * + * @example + * var bool = ns.startsWith( 'To be, or not to be, that is the question.', 'to be', 14 ); + * // returns true + * + * @example + * var bool = ns.startsWith( 'To be, or not to be, that is the question.', 'quest', -9 ); + * // returns true + */ + startsWith: typeof startsWith; + + /** + * Trims whitespace characters from the beginning and end of a string. + * + * @param str - input string + * @returns trimmed string + * + * @example + * var out = ns.trim( ' Whitespace ' ); + * // returns 'Whitespace' + * + * @example + * var out = ns.trim( '\t\t\tTabs\t\t\t' ); + * // returns 'Tabs' + * + * @example + * var out = ns.trim( '\n\n\nNew Lines\n\n\n' ); + * // returns 'New Lines' + */ + trim: typeof trim; + + /** + * Uncapitalizes the first character of a string. + * + * @param str - input string + * @returns input string with first character converted to lowercase + * + * @example + * var out = ns.uncapitalize( 'Last man standing' ); + * // returns 'last man standing' + * + * @example + * var out = ns.uncapitalize( 'Presidential election' ); + * // returns 'presidential election' + * + * @example + * var out = ns.uncapitalize( 'JavaScript' ); + * // returns 'javaScript' + * + * @example + * var out = ns.uncapitalize( 'Hidden Treasures' ); + * // returns 'hidden Treasures' + */ + uncapitalize: typeof uncapitalize; + + /** + * Converts a string to uppercase. + * + * @param str - string to convert + * @returns uppercase string + * + * @example + * var str = ns.uppercase( 'bEEp' ); + * // returns 'BEEP' + */ + uppercase: typeof uppercase; } /** diff --git a/lib/node_modules/@stdlib/string/base/docs/types/test.ts b/lib/node_modules/@stdlib/string/base/docs/types/test.ts index 9fe9d6b452c3..ed1e2f4151a3 100644 --- a/lib/node_modules/@stdlib/string/base/docs/types/test.ts +++ b/lib/node_modules/@stdlib/string/base/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import base = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - base; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/string/docs/types/index.d.ts b/lib/node_modules/@stdlib/string/docs/types/index.d.ts index 16b941f0142a..c0c9a7bae438 100644 --- a/lib/node_modules/@stdlib/string/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/string/docs/types/index.d.ts @@ -60,6 +60,8 @@ import substringAfter = require( '@stdlib/string/substring-after' ); import substringAfterLast = require( '@stdlib/string/substring-after-last' ); import substringBefore = require( '@stdlib/string/substring-before' ); import substringBeforeLast = require( '@stdlib/string/substring-before-last' ); +import graphemeClusters2iterator = require( '@stdlib/string/to-grapheme-cluster-iterator' ); +import graphemeClusters2iteratorRight = require( '@stdlib/string/to-grapheme-cluster-iterator-right' ); import trim = require( '@stdlib/string/trim' ); import truncate = require( '@stdlib/string/truncate' ); import truncateMiddle = require( '@stdlib/string/truncate-middle' ); @@ -102,7 +104,7 @@ interface Namespace { * Converts a string to camel case. * * @param str - string to convert - * @returns a camel-cased string + * @returns camel-cased string * * @example * var str = ns.camelcase( 'Hello World!' ); @@ -148,10 +150,8 @@ interface Namespace { * @param str - input string * @param idx - position * @param backward - backward iteration for low surrogates (default: false) - * @throws first argument must be a string - * @throws second argument must be a nonnegative integer - * @throws third argument must be a boolean - * @throws position must be a valid index in string + * @throws second argument must be an integer + * @throws second argument must be a valid index * @returns code point * * @example @@ -167,7 +167,7 @@ interface Namespace { * Converts a string to constant case. * * @param str - string to convert - * @returns a constant-cased string + * @returns constant-cased string * * @example * var str = ns.constantcase( 'beep' ); @@ -184,7 +184,11 @@ interface Namespace { constantcase: typeof constantcase; /** - * Test if a string ends with the characters of another string. + * Tests if a string ends with the characters of another string. + * + * ## Notes + * + * - The last parameter restricts the search to a substring within the input string beginning from the leftmost character. If provided a negative value, `len` indicates to ignore the last `len` characters, returning the same output as `str.length + len`. * * @param str - input string * @param search - search string @@ -254,7 +258,7 @@ interface Namespace { * Converts a string to kebab case. * * @param str - string to convert - * @returns a kebab-cased string + * @returns kebab-cased string * * @example * var str = ns.kebabcase( 'fooBar' ); @@ -455,7 +459,7 @@ interface Namespace { * Converts a string to Pascal case. * * @param str - string to convert - * @returns a Pascal-cased string + * @returns Pascal-cased string * * @example * var str = ns.pascalcase( 'Hello World!' ); @@ -472,7 +476,7 @@ interface Namespace { pascalcase: typeof pascalcase; /** - * Percent-encode a UTF-16 encoded string according to [RFC 3986][1]. + * Percent-encodes a UTF-16 encoded string according to [RFC 3986][1]. * * [1]: https://tools.ietf.org/html/rfc3986#section-2.1 * @@ -652,11 +656,11 @@ interface Namespace { repeat: typeof repeat; /** - * Replace search occurrences with a replacement string. + * Replaces search occurrences with a replacement string. * * ## Notes * - * - When provided a `string` as the `search` value, the function replaces *all* occurrences. To remove only the first match, use a regular expression. + * - When provided a `string` as the `search` value, the function replaces **all** occurrences. To remove only the first match, use a regular expression. * * @param str - input string * @param search - search expression @@ -793,7 +797,7 @@ interface Namespace { * Converts a string to snake case. * * @param str - string to convert - * @returns a snake-cased string + * @returns snake-cased string * * @example * var str = ns.snakecase( 'fooBar' ); @@ -829,7 +833,7 @@ interface Namespace { * Capitalizes the first letter of each word in an input string. * * @param str - string to convert - * @returns start case string + * @returns start-cased string * * @example * var str = ns.startcase( 'beep boop foo bar' ); @@ -840,6 +844,10 @@ interface Namespace { /** * Tests if a string starts with the characters of another string. * + * ## Notes + * + * - If provided a negative `position`, the search starting position is resolved relative to the end of the string. For example, if provided the input string `'beep boop'` and a `position` equal to `-2`, the starting position resolves to `7`. + * * @param str - input string * @param search - search string * @param position - position at which to start searching (default: 0) @@ -990,7 +998,51 @@ interface Namespace { substringBeforeLast: typeof substringBeforeLast; /** - * Trim whitespace characters from beginning and end of a string. + * Returns an iterator which iterates over each grapheme cluster in a string. + * + * @param src - input value + * @param mapFc - function to invoke for each iterated value + * @param thisArg - execution context + * @returns iterator + * + * @example + * var iter = ns.graphemeClusters2iterator( '🌷🍕' ); + * + * var v = iter.next().value; + * // returns '🌷' + * + * v = iter.next().value; + * // returns '🍕' + * + * var bool = iter.next().done; + * // returns true + */ + graphemeClusters2iterator: typeof graphemeClusters2iterator; + + /** + * Returns an iterator which iterates from right to left over each grapheme cluster in a string. + * + * @param src - input value + * @param mapFc - function to invoke for each iterated value + * @param thisArg - execution context + * @returns iterator + * + * @example + * var iter = ns.graphemeClusters2iteratorRight( '🌷🍕' ); + * + * var v = iter.next().value; + * // returns '🍕' + * + * v = iter.next().value; + * // returns '🌷' + * + * var bool = iter.next().done; + * // returns true + */ + graphemeClusters2iteratorRight: typeof graphemeClusters2iteratorRight; + + /** + * Trims whitespace characters from the beginning and end of a string. * * @param str - input string * @returns trimmed string diff --git a/lib/node_modules/@stdlib/string/docs/types/test.ts b/lib/node_modules/@stdlib/string/docs/types/test.ts index c51b7e09a789..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/string/docs/types/test.ts +++ b/lib/node_modules/@stdlib/string/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import string = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - string; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/string/tools/docs/types/test.ts b/lib/node_modules/@stdlib/string/tools/docs/types/test.ts index e9b94b1eae39..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/string/tools/docs/types/test.ts +++ b/lib/node_modules/@stdlib/string/tools/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import tools = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - tools; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/symbol/docs/types/test.ts b/lib/node_modules/@stdlib/symbol/docs/types/test.ts index 683e0302fa4a..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/symbol/docs/types/test.ts +++ b/lib/node_modules/@stdlib/symbol/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import symbol = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - symbol; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/time/docs/types/test.ts b/lib/node_modules/@stdlib/time/docs/types/test.ts index 0ac0780fa51a..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/time/docs/types/test.ts +++ b/lib/node_modules/@stdlib/time/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import time = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - time; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/utils/async/docs/types/test.ts b/lib/node_modules/@stdlib/utils/async/docs/types/test.ts index 076624ec86c9..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/utils/async/docs/types/test.ts +++ b/lib/node_modules/@stdlib/utils/async/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import async = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - async; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/utils/docs/types/index.d.ts b/lib/node_modules/@stdlib/utils/docs/types/index.d.ts index 187ed369de95..c94a8e73ecfe 100644 --- a/lib/node_modules/@stdlib/utils/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/utils/docs/types/index.d.ts @@ -44,6 +44,7 @@ import copy = require( '@stdlib/utils/copy' ); import countBy = require( '@stdlib/utils/count-by' ); import curry = require( '@stdlib/utils/curry' ); import curryRight = require( '@stdlib/utils/curry-right' ); +import decorateAfter = require( '@stdlib/utils/decorate-after' ); import deepGet = require( '@stdlib/utils/deep-get' ); import deepPluck = require( '@stdlib/utils/deep-pluck' ); import deepSet = require( '@stdlib/utils/deep-set' ); @@ -73,6 +74,7 @@ import doWhile = require( '@stdlib/utils/do-while' ); import doWhileEach = require( '@stdlib/utils/do-while-each' ); import doWhileEachRight = require( '@stdlib/utils/do-while-each-right' ); import DoublyLinkedList = require( '@stdlib/utils/doubly-linked-list' ); +import dsv = require( '@stdlib/utils/dsv' ); import objectEntries = require( '@stdlib/utils/entries' ); import objectEntriesIn = require( '@stdlib/utils/entries-in' ); import enumerableProperties = require( '@stdlib/utils/enumerable-properties' ); @@ -208,6 +210,7 @@ import someByRight = require( '@stdlib/utils/some-by-right' ); import Stack = require( '@stdlib/utils/stack' ); import tabulate = require( '@stdlib/utils/tabulate' ); import tabulateBy = require( '@stdlib/utils/tabulate-by' ); +import thunk = require( '@stdlib/utils/thunk' ); import timeit = require( '@stdlib/utils/timeit' ); import trycatch = require( '@stdlib/utils/try-catch' ); import tryFunction = require( '@stdlib/utils/try-function' ); @@ -949,6 +952,50 @@ interface Namespace { */ curryRight: typeof curryRight; + /** + * Decorates a provided function such that the function's return value is provided as an argument to another function. + * + * @param fcn - function to decorate + * @param arity - number of parameters + * @param after - function to invoke with the return value of the decorated function + * @param thisArg - evaluation context for `after` + * @throws `arity` must be a nonnegative integer + * @returns decorator + * + * @example + * var abs = require( `@stdlib/math/base/special/abs` ); + * + * function negate( v ) { + * return -v; + * } + * + * var f = ns.decorateAfter( abs, 1, negate ); + * // returns + * + * var v = f( -5 ); + * // returns -5 + * + * v = f( 5 ); + * // returns -5 + * + * @example + * var abs = require( `@stdlib/math/base/special/abs` ); + * + * function negate( v ) { + * return -v; + * } + * + * var f = ns.decorateAfter.factory( abs, 1, negate ); + * // returns + * + * var v = f( -5 ); + * // returns -5 + * + * v = f( 5 ); + * // returns -5 + */ + decorateAfter: typeof decorateAfter; + /** * Returns a nested property value. * @@ -1801,6 +1848,11 @@ interface Namespace { */ DoublyLinkedList: typeof DoublyLinkedList; + /** + * Standard utilities for working with data formatted as delimiter-separated values (DSV). + */ + dsv: typeof dsv; + /** * Returns an array of an object's own enumerable property `[key, value]` pairs. * @@ -5519,6 +5571,27 @@ interface Namespace { */ tabulateBy: typeof tabulateBy; + /** + * Returns a thunk. + * + * @param fcn - function to convert to a thunk + * @param args - function args + * @returns thunk + * + * @example + * var add = require( `@stdlib/math/base/ops/add` ); + * + * var f = ns.thunk( add, 2, 3 ); + * // returns + * + * // ... + * + * // Evaluate the ns.thunk: + * var v = f(); + * // returns 5 + */ + thunk: typeof thunk; + /** * Times a snippet. * diff --git a/lib/node_modules/@stdlib/utils/docs/types/test.ts b/lib/node_modules/@stdlib/utils/docs/types/test.ts index a192bc0b0c1c..1cdbcd0070fe 100644 --- a/lib/node_modules/@stdlib/utils/docs/types/test.ts +++ b/lib/node_modules/@stdlib/utils/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import utils = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - utils; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/utils/dsv/base/docs/types/index.d.ts b/lib/node_modules/@stdlib/utils/dsv/base/docs/types/index.d.ts index cf0584fe92ec..e37d6cc5a5ae 100644 --- a/lib/node_modules/@stdlib/utils/dsv/base/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/utils/dsv/base/docs/types/index.d.ts @@ -21,8 +21,10 @@ /* tslint:disable:max-line-length */ /* tslint:disable:max-file-line-count */ +import parse = require( '@stdlib/utils/dsv/base/parse' ); + /** -* Interface describing the base `dsv` namespace. +* Interface describing the `base` namespace. */ interface Namespace { diff --git a/lib/node_modules/@stdlib/utils/dsv/base/docs/types/test.ts b/lib/node_modules/@stdlib/utils/dsv/base/docs/types/test.ts index 9fe9d6b452c3..ed1e2f4151a3 100644 --- a/lib/node_modules/@stdlib/utils/dsv/base/docs/types/test.ts +++ b/lib/node_modules/@stdlib/utils/dsv/base/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import base = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - base; // $ExpectType Namespace + ns; // $ExpectType Namespace } diff --git a/lib/node_modules/@stdlib/utils/dsv/docs/types/index.d.ts b/lib/node_modules/@stdlib/utils/dsv/docs/types/index.d.ts index 68b0ae6da0bd..e09c29a3d065 100644 --- a/lib/node_modules/@stdlib/utils/dsv/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/utils/dsv/docs/types/index.d.ts @@ -21,11 +21,16 @@ /* tslint:disable:max-line-length */ /* tslint:disable:max-file-line-count */ +import base = require( '@stdlib/utils/dsv/base' ); + /** * Interface describing the `dsv` namespace. */ interface Namespace { - + /** + * Standard base utilities for working with data formatted as delimiter-separated values (DSV). + */ + base: typeof base; } /** diff --git a/lib/node_modules/@stdlib/utils/dsv/docs/types/test.ts b/lib/node_modules/@stdlib/utils/dsv/docs/types/test.ts index 738eb79e6c94..ed1e2f4151a3 100644 --- a/lib/node_modules/@stdlib/utils/dsv/docs/types/test.ts +++ b/lib/node_modules/@stdlib/utils/dsv/docs/types/test.ts @@ -18,12 +18,12 @@ /* tslint:disable:no-unused-expression */ -import dsv = require( './index' ); +import ns = require( './index' ); // TESTS // // The exported value is the expected interface... { - dsv; // $ExpectType Namespace + ns; // $ExpectType Namespace }