From 9801edf052f10e6acc8064f01fb6a970f4606d16 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 18:29:02 +0530 Subject: [PATCH 01/20] feat: added assert/is-negative-finite This commit adds the assert/is-negative-finite module for handling negative finite values. --- .../assert/is-negative-finite/README.md | 160 ++++++++++++ .../is-negative-finite/benchmark/benchmark.js | 227 ++++++++++++++++++ .../assert/is-negative-finite/docs/repl.txt | 86 +++++++ .../is-negative-finite/docs/types/index.d.ts | 137 +++++++++++ .../is-negative-finite/docs/types/test.ts | 61 +++++ .../is-negative-finite/examples/index.js | 49 ++++ .../assert/is-negative-finite/lib/index.js | 90 +++++++ .../assert/is-negative-finite/lib/main.js | 62 +++++ .../assert/is-negative-finite/lib/object.js | 60 +++++ .../is-negative-finite/lib/primitive.js | 60 +++++ .../assert/is-negative-finite/package.json | 71 ++++++ .../assert/is-negative-finite/test/test.js | 43 ++++ .../is-negative-finite/test/test.main.js | 64 +++++ .../is-negative-finite/test/test.object.js | 71 ++++++ .../is-negative-finite/test/test.primitive.js | 68 ++++++ 15 files changed, 1309 insertions(+) create mode 100644 lib/node_modules/@stdlib/assert/is-negative-finite/README.md create mode 100644 lib/node_modules/@stdlib/assert/is-negative-finite/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/assert/is-negative-finite/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/assert/is-negative-finite/examples/index.js create mode 100644 lib/node_modules/@stdlib/assert/is-negative-finite/lib/index.js create mode 100644 lib/node_modules/@stdlib/assert/is-negative-finite/lib/main.js create mode 100644 lib/node_modules/@stdlib/assert/is-negative-finite/lib/object.js create mode 100644 lib/node_modules/@stdlib/assert/is-negative-finite/lib/primitive.js create mode 100644 lib/node_modules/@stdlib/assert/is-negative-finite/package.json create mode 100644 lib/node_modules/@stdlib/assert/is-negative-finite/test/test.js create mode 100644 lib/node_modules/@stdlib/assert/is-negative-finite/test/test.main.js create mode 100644 lib/node_modules/@stdlib/assert/is-negative-finite/test/test.object.js create mode 100644 lib/node_modules/@stdlib/assert/is-negative-finite/test/test.primitive.js diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/README.md b/lib/node_modules/@stdlib/assert/is-negative-finite/README.md new file mode 100644 index 000000000000..d0e935d23644 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/README.md @@ -0,0 +1,160 @@ + + +# isNegativeFinite + +> Test if a value is a number having a finite negative value. + +
+ +## Usage + +```javascript +var isNegativeFinite = require( '@stdlib/assert/is-negative-finite' ); +``` + +#### isNegativeFinite( value ) + +Tests if a `value` is a `number` having a finite negative value. + + + +```javascript +var Number = require( '@stdlib/number/ctor' ); + +var bool = isNegativeFinite( -5.0 ); +// returns true + +bool = isNegativeFinite( new Number( -5.0 ) ); +// returns true + +bool = isNegativeFinite( -3.14 ); +// returns true + +bool = isNegativeFinite( 5.0 ); +// returns false + +bool = isNegativeFinite( null ); +// returns false + +bool = isNegativeFinite( Number.NEGATIVE_INFINITY ); +// returns false +``` + +#### isNegativeFinite.isPrimitive( value ) + +Tests if a `value` is a primitive `number` having a finite negative value. + + + +```javascript +var Number = require( '@stdlib/number/ctor' ); + +var bool = isNegativeFinite.isPrimitive( -3.0 ); +// returns true + +bool = isNegativeFinite.isPrimitive( new Number( -3.0 ) ); +// returns false +``` + +#### isNegativeFinite.isObject( value ) + +Tests if a `value` is a `Number` object having a finite negative value. + + + +```javascript +var Number = require( '@stdlib/number/ctor' ); + +var bool = isNegativeFinite.isObject( -3.0 ); +// returns false + +bool = isNegativeFinite.isObject( new Number( -3.0 ) ); +// returns true +``` + +
+ + + +
+ +## Examples + + + + + +```javascript +var Number = require( '@stdlib/number/ctor' ); + +var bool = isNegativeFinite( -5.0 ); +// returns true + +bool = isNegativeFinite( new Number( -5.0 ) ); +// returns true + +bool = isNegativeFinite( -3.14 ); +// returns true + +bool = isNegativeFinite( 0.0 ); +// returns false + +bool = isNegativeFinite( 5.0 ); +// returns false + +bool = isNegativeFinite( '-5' ); +// returns false + +bool = isNegativeFinite( null ); +// returns false +``` + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/benchmark/benchmark.js b/lib/node_modules/@stdlib/assert/is-negative-finite/benchmark/benchmark.js new file mode 100644 index 000000000000..926e126eae69 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/benchmark/benchmark.js @@ -0,0 +1,227 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-undefined, no-empty-function */ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive; +var Number = require( '@stdlib/number/ctor' ); +var pkg = require( './../package.json' ).name; +var isNegativeFinite = require( './../lib' ); + + +// MAIN // + +bench( pkg+'::primitives', function benchmark( b ) { + var values; + var bool; + var i; + + values = [ + '5', + 5.0, + 4.0, + 3.14, + -5.0, + -4.0, + Number.NEGATIVE_INFINITY, + NaN, + true, + false, + null, + undefined + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + bool = isNegativeFinite( values[ i % values.length ] ); + if ( typeof bool !== 'boolean' ) { + b.fail( 'should return a boolean' ); + } + } + b.toc(); + if ( !isBoolean( bool ) ) { + b.fail( 'should return a boolean' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::objects', function benchmark( b ) { + var values; + var bool; + var i; + + values = [ + [], + {}, + function noop() {}, + new Number( 2.0 ), + new Number( -3.0 ), + new Number( 3.14 ), + new Number( Number.NEGATIVE_INFINITY ) + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + bool = isNegativeFinite( values[ i % values.length ] ); + if ( typeof bool !== 'boolean' ) { + b.fail( 'should return a boolean' ); + } + } + b.toc(); + if ( !isBoolean( bool ) ) { + b.fail( 'should return a boolean' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::primitives:isPrimitive', function benchmark( b ) { + var values; + var bool; + var i; + + values = [ + '5', + 5.0, + 4.0, + 3.14, + -5.0, + -4.0, + Number.NEGATIVE_INFINITY, + NaN, + true, + false, + null, + undefined + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + bool = isNegativeFinite.isPrimitive( values[ i % values.length ] ); + if ( typeof bool !== 'boolean' ) { + b.fail( 'should return a boolean' ); + } + } + b.toc(); + if ( !isBoolean( bool ) ) { + b.fail( 'should return a boolean' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::objects:isPrimitive', function benchmark( b ) { + var values; + var bool; + var i; + + values = [ + [], + {}, + function noop() {}, + new Number( 2.0 ), + new Number( -3.0 ), + new Number( 3.14 ), + new Number( Number.NEGATIVE_INFINITY ) + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + bool = isNegativeFinite.isPrimitive( values[ i % values.length ] ); + if ( typeof bool !== 'boolean' ) { + b.fail( 'should return a boolean' ); + } + } + b.toc(); + if ( !isBoolean( bool ) ) { + b.fail( 'should return a boolean' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::primitives:isObject', function benchmark( b ) { + var values; + var bool; + var i; + + values = [ + '5', + 5.0, + 4.0, + 3.14, + -5.0, + -4.0, + Number.NEGATIVE_INFINITY, + NaN, + true, + false, + null, + undefined + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + bool = isNegativeFinite.isObject( values[ i % values.length ] ); + if ( typeof bool !== 'boolean' ) { + b.fail( 'should return a boolean' ); + } + } + b.toc(); + if ( !isBoolean( bool ) ) { + b.fail( 'should return a boolean' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::objects:isObject', function benchmark( b ) { + var values; + var bool; + var i; + + values = [ + [], + {}, + function noop() {}, + new Number( 2.0 ), + new Number( -3.0 ), + new Number( 3.14 ), + new Number( Number.NEGATIVE_INFINITY ) + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + bool = isNegativeFinite.isObject( values[ i % values.length ] ); + if ( typeof bool !== 'boolean' ) { + b.fail( 'should return a boolean' ); + } + } + b.toc(); + if ( !isBoolean( bool ) ) { + b.fail( 'should return a boolean' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/docs/repl.txt b/lib/node_modules/@stdlib/assert/is-negative-finite/docs/repl.txt new file mode 100644 index 000000000000..586dee6cf058 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/docs/repl.txt @@ -0,0 +1,86 @@ + +{{alias}}( value ) + Tests if a value is a finite negative number. + + Parameters + ---------- + value: any + Value to test. + + Returns + ------- + bool: boolean + Boolean indicating whether value is a finite negative number. + + Examples + -------- + > var bool = {{alias}}( -5.0 ) + true + > bool = {{alias}}( new Number( -5.0 ) ) + true + > bool = {{alias}}( -3.14 ) + true + > bool = {{alias}}( 5.0 ) + false + > bool = {{alias}}( null ) + false + > bool = {{alias}}( Number.NEGATIVE_INFINITY ) + false + > bool = {{alias}}( new Number( Number.NEGATIVE_INFINITY ) ) + false + + +{{alias}}.isPrimitive( value ) + Tests if a value is a number primitive having a finite negative value. + + Parameters + ---------- + value: any + Value to test. + + Returns + ------- + bool: boolean + Boolean indicating whether value is a number primitive having a finite + negative value. + + Examples + -------- + > var bool = {{alias}}.isPrimitive( -3.0 ) + true + > bool = {{alias}}.isPrimitive( new Number( -3.0 ) ) + false + > var bool = {{alias}}.isPrimitive( Number.NEGATIVE_INFINITY ) + false + > bool = {{alias}}.isPrimitive( new Number( Number.NEGATIVE_INFINITY ) ) + false + + +{{alias}}.isObject( value ) + Tests if a value is a number object having a finite negative value. + + Parameters + ---------- + value: any + Value to test. + + Returns + ------- + bool: boolean + Boolean indicating whether value is a number object having a finite + negative value. + + Examples + -------- + > var bool = {{alias}}.isObject( -3.0 ) + false + > bool = {{alias}}.isObject( new Number( -3.0 ) ) + true + > var bool = {{alias}}.isObject( Number.NEGATIVE_INFINITY ) + false + > bool = {{alias}}.isObject( new Number( Number.NEGATIVE_INFINITY ) ) + false + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/index.d.ts b/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/index.d.ts new file mode 100644 index 000000000000..b511798b97aa --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/index.d.ts @@ -0,0 +1,137 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2019 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/** +* Interface defining `isNegativeFinite` with methods for testing for primitives and objects, respectively. +*/ +interface isNegativeFinite { + /** + * Tests if a value is a finite negative number. + * + * @param value - value to test + * @returns boolean indicating whether value is a finite negative number + * + * @example + * var bool = isNegativeFinite( -5.0 ); + * // returns true + * + * @example + * var bool = isNegativeFinite( new Number( -5.0 ) ); + * // returns true + * + * @example + * var bool = isNegativeFinite( -3.14 ); + * // returns true + * + * @example + * var bool = isNegativeFinite( 5.0 ); + * // returns false + * + * @example + * var bool = isNegativeFinite( null ); + * // returns false + * + * @example + * var bool = isNegativeFinite( Number.NEGATIVE_INFINITY ); + * // returns false + */ + ( value: number | Number ): value is number | Number; + + /** + * Tests if a value is a number primitive having a finite negative value. + * + * @param value - value to test + * @returns boolean indicating if a value is a number primitive having a finite negative value + * + * @example + * var bool = isNegativeFinite.isPrimitive( -3.0 ); + * // returns true + * + * @example + * var bool = isNegativeFinite.isPrimitive( new Number( -3.0 ) ); + * // returns false + */ + isPrimitive( value: number | Number ): value is number; + + /** + * Tests if a value is a number object having a negative value. + * + * @param value - value to test + * @returns boolean indicating if a value is a number object having a negative value + * + * @example + * var bool = isNegativeFinite.isObject( -3.0 ); + * // returns false + * + * @example + * var bool = isNegativeFinite.isObject( new Number( -3.0 ) ); + * // returns true + */ + isObject( value: number | Number ): value is Number; +} + +/** +* Tests if a value is a negative number. +* +* @param value - value to test +* @returns boolean indicating whether value is a negative number +* +* @example +* var bool = isNegativeFinite( -5.0 ); +* // returns true +* +* @example +* var bool = isNegativeFinite( new Number( -5.0 ) ); +* // returns true +* +* @example +* var bool = isNegativeFinite( -3.14 ); +* // returns true +* +* @example +* var bool = isNegativeFinite( 5.0 ); +* // returns false +* +* @example +* var bool = isNegativeFinite( null ); +* // returns false +* +* @example +* var bool = isNegativeFinite.isPrimitive( -3.0 ); +* // returns true +* +* @example +* var bool = isNegativeFinite.isObject( new Number( -3.0 ) ); +* // returns true +* +* @example +* var bool = isNegativeFinite.isPrimitive( Number.NEGATIVE_INFINITY ); +* // returns false +* +* @example +* var bool = isNegativeFinite.isObject( new Number( Number.NEGATIVE_INFINITY ) ); +* // returns false +*/ +declare var isNegativeFinite: isNegativeFinite; + + +// EXPORTS // + +export = isNegativeFinite; diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts b/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts new file mode 100644 index 000000000000..28afd3cd3481 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts @@ -0,0 +1,61 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2019 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import isNegativeFinite = require( './index' ); + + +// TESTS // + +// The function returns a boolean... +{ + isNegativeFinite( 3 ); // $ExpectType boolean + isNegativeFinite( -2 ); // $ExpectType boolean +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + isNegativeFinite(); // $ExpectError + isNegativeFinite( -2, 123 ); // $ExpectError +} + +// Attached to main export is an isPrimitive method which returns a boolean... +{ + // eslint-disable-next-line no-new-wrappers + isNegativeFinite.isPrimitive( new Number( -2 ) ); // $ExpectType boolean + isNegativeFinite.isPrimitive( -2 ); // $ExpectType boolean +} + +// The compiler throws an error if the isPrimitive method is provided an unsupported number of arguments... +{ + isNegativeFinite.isPrimitive(); // $ExpectError + isNegativeFinite.isPrimitive( -2, 123 ); // $ExpectError +} + + +// Attached to main export is an isPrimitive method which returns a boolean... +{ + // eslint-disable-next-line no-new-wrappers + isNegativeFinite.isObject( new Number( -2 ) ); // $ExpectType boolean + isNegativeFinite.isObject( -2 ); // $ExpectType boolean +} + +// The compiler throws an error if the isObject method is provided an unsupported number of arguments... +{ + isNegativeFinite.isObject(); // $ExpectError + isNegativeFinite.isObject( -2, 123 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/examples/index.js b/lib/node_modules/@stdlib/assert/is-negative-finite/examples/index.js new file mode 100644 index 000000000000..0d9266519b74 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/examples/index.js @@ -0,0 +1,49 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var Number = require( '@stdlib/number/ctor' ); +var isNegativeFinite = require( './../lib' ); + +console.log( isNegativeFinite( -5.0 ) ); +// => true + +console.log( isNegativeFinite( new Number( -5.0 ) ) ); +// => true + +console.log( isNegativeFinite( -3.14 ) ); +// => true + +console.log( isNegativeFinite( 0.0 ) ); +// => false + +console.log( isNegativeFinite( 5.0 ) ); +// => false + +console.log( isNegativeFinite( '-5' ) ); +// => false + +console.log( isNegativeFinite( null ) ); +// => false + +console.log( isNegativeFinite( Number.NEGATIVE_INFINITY ) ); +// => false + +console.log( isNegativeFinite( new Number(Number.NEGATIVE_INFINITY) ) ); +// => false diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/lib/index.js b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/index.js new file mode 100644 index 000000000000..653bd7650c81 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/index.js @@ -0,0 +1,90 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Test if a value is a negative finite number. +* +* @module @stdlib/assert/is-negative-finite +* +* @example +* var isNegativeFinite = require( '@stdlib/assert/is-negative-finite' ); +* +* var bool = isNegativeFinite( -5.0 ); +* // returns true +* +* bool = isNegativeFinite( new Number( -5.0 ) ); +* // returns true +* +* bool = isNegativeFinite( -3.14 ); +* // returns true +* +* bool = isNegativeFinite( 5.0 ); +* // returns false +* +* bool = isNegativeFinite( null ); +* // returns false +* +* bool = isNegativeFinite( Number.NEGATIVE_INFINITY ); +* // returns false +* +* @example +* // Use interface to check for finite negative number primitives... +* var isNegativeFinite = require( '@stdlib/assert/is-negative-finite' ).isPrimitive; +* +* var bool = isNegativeFinite( -3.0 ); +* // returns true +* +* bool = isNegativeFinite( new Number( -3.0 ) ); +* // returns false +* +* bool = isNegativeFinite( new Number( Number.NEGATIVE_INFINITY ) ); +* // returns false +* +* @example +* // Use interface to check for negative number objects... +* var isNegativeFinite = require( '@stdlib/assert/is-negative-finite' ).isObject; +* +* var bool = isNegativeFinite( -3.0 ); +* // returns false +* +* bool = isNegativeFinite( new Number( -3.0 ) ); +* // returns true +* +* bool = isNegativeFinite( new Number( Number.NEGATIVE_INFINITY ) ); +* // returns false +*/ + +// MODULES // + +var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); +var main = require( './main.js' ); +var isPrimitive = require( './primitive.js' ); +var isObject = require( './object.js' ); + + +// MAIN // + +setReadOnly( main, 'isPrimitive', isPrimitive ); +setReadOnly( main, 'isObject', isObject ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/lib/main.js b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/main.js new file mode 100644 index 000000000000..423a93a23bae --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/main.js @@ -0,0 +1,62 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var isPrimitive = require( './primitive.js' ); +var isObject = require( './object.js' ); + + +// MAIN // + +/** +* Tests if a value is a finite negative number. +* +* @param {*} value - value to test +* @returns {boolean} boolean indicating whether value is a finite negative number +* +* @example +* var bool = isNegativeFinite( -5.0 ); +* // returns true +* +* @example +* var bool = isNegativeFinite( new Number( -5.0 ) ); +* // returns true +* +* @example +* var bool = isNegativeFinite( -3.14 ); +* // returns true +* +* @example +* var bool = isNegativeFinite( 5.0 ); +* // returns false +* +* @example +* var bool = isNegativeFinite( null ); +* // returns false +*/ +function isNegativeFinite( value ) { + return ( isPrimitive( value ) || isObject( value ) ); +} + + +// EXPORTS // + +module.exports = isNegativeFinite; diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/lib/object.js b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/object.js new file mode 100644 index 000000000000..5ee9baf8e09a --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/object.js @@ -0,0 +1,60 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var isNumber = require( '@stdlib/assert/is-number' ).isObject; + + +// MAIN // + +/** +* Tests if a value is a number object having a finite negative value. +* +* @param {*} value - value to test +* @returns {boolean} boolean indicating if a value is a number object having a finite negative value +* +* @example +* var bool = isNegativeFinite( -3.0 ); +* // returns false +* +* @example +* var bool = isNegativeFinite( Number.NEGATIVE_INFINITY ); +* // returns false +* +* @example +* var bool = isNegativeFinite( new Number( -3.0 ) ); +* // returns true +* +* @example +* var bool = isNegativeFinite( new Number( Number.NEGATIVE_INFINITY ) ); +* // returns false +*/ +function isNegativeFinite( value ) { + return ( + isNumber( value ) && + value.valueOf() < 0.0 && isFinite(value) + ); +} + + +// EXPORTS // + +module.exports = isNegativeFinite; diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/lib/primitive.js b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/primitive.js new file mode 100644 index 000000000000..02f04272b8a1 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/primitive.js @@ -0,0 +1,60 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var isNumber = require( '@stdlib/assert/is-number' ).isPrimitive; + + +// MAIN // + +/** +* Tests if a value is a number primitive having finite a negative value. +* +* @param {*} value - value to test +* @returns {boolean} boolean indicating if a value is a number primitive having a finite negative value +* +* @example +* var bool = isNegativeFinite( -3.0 ); +* // returns true +* +* @example +* var bool = isNegativeFinite( Number.NEGATIVE_INFINITY ); +* // returns false +* +* @example +* var bool = isNegativeFinite( new Number( -3.0 ) ); +* // returns false +* +* @example +* var bool = isNegativeFinite( new Number( Number.NEGATIVE_INFINITY ) ); +* // returns false +*/ +function isNegativeFinite( value ) { + return ( + isNumber( value ) && + value < 0.0 && isFinite(value) + ); +} + + +// EXPORTS // + +module.exports = isNegativeFinite; diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/package.json b/lib/node_modules/@stdlib/assert/is-negative-finite/package.json new file mode 100644 index 000000000000..2baaeae6d0a0 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/package.json @@ -0,0 +1,71 @@ +{ + "name": "@stdlib/assert/is-negative-number", + "version": "0.0.0", + "description": "Test if a value is a number having a negative value.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdassert", + "assertion", + "assert", + "utilities", + "utility", + "utils", + "util", + "number", + "numeric", + "negative", + "is", + "isnumber", + "isnumeric", + "type", + "check", + "primitive", + "object" + ] +} diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.js b/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.js new file mode 100644 index 000000000000..c734049125fc --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var isNegativeFinite = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof isNegativeFinite, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'attached to the main export is a method to test for a primitive number having a finite negative value', function test( t ) { + t.equal( typeof isNegativeFinite.isPrimitive, 'function', 'export is a function' ); + t.end(); +}); + +tape( 'attached to the main export is a method to test for a number object having a finite negative value', function test( t ) { + t.equal( typeof isNegativeFinite.isObject, 'function', 'export is a function' ); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.main.js b/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.main.js new file mode 100644 index 000000000000..2eb3ba849064 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.main.js @@ -0,0 +1,64 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var Number = require( '@stdlib/number/ctor' ); +var isNegativeFinite = require( './../lib/main.js' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof isNegativeFinite, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns `true` if provided a number having a finite negative number value', function test( t ) { + t.equal( isNegativeFinite( -5.0 ), true, 'returns true' ); + t.equal( isNegativeFinite( new Number( -5.0 ) ), true, 'returns true' ); + t.end(); +}); + +tape( 'the function returns `false` if not provided a number having a finite negative number value', function test( t ) { + var values; + var i; + + values = [ + '5', + 3.14, + 1.0, + 0.0, + Number.NEGATIVE_INFINITY, + null, + true, + void 0, + [], + {}, + function noop() {} + ]; + + for ( i = 0; i < values.length; i++ ) { + t.equal( isNegativeFinite( values[i] ), false, 'returns false when provided '+values[i] ); + } + t.end(); +}); diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.object.js b/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.object.js new file mode 100644 index 000000000000..ebd5c0b51c3e --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.object.js @@ -0,0 +1,71 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var Number = require( '@stdlib/number/ctor' ); +var isNegativeFinite = require( './../lib/object.js' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof isNegativeFinite, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns `true` if provided a number object having a finite negative value', function test( t ) { + t.equal( isNegativeFinite( new Number( -5.0 ) ), true, 'returns true' ); + t.end(); +}); + +tape( 'the function returns `false` if provided a primitive number, even if the number is a finite negative value', function test( t ) { + t.equal( isNegativeFinite( -3.0 ), false, 'returns false' ); + t.end(); +}); + +tape( 'the function returns `false` if not provided a finite negative number', function test( t ) { + var values; + var i; + + values = [ + '5', + new Number( 0.0 ), + new Number( 2.0 ), + 3.14, + null, + true, + void 0, + Number.NEGATIVE_INFINITY, + [], + {}, + new Date(), + /./, + new RegExp( '.' ), // eslint-disable-line prefer-regex-literals + function noop() {} + ]; + + for ( i = 0; i < values.length; i++ ) { + t.equal( isNegativeFinite( values[i] ), false, 'returns false when provided '+values[i] ); + } + t.end(); +}); diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.primitive.js b/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.primitive.js new file mode 100644 index 000000000000..b402f60c4153 --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.primitive.js @@ -0,0 +1,68 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var Number = require( '@stdlib/number/ctor' ); +var isNegativeFinite = require( './../lib/primitive.js' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof isNegativeFinite, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns `true` if provided a primitive number having a finite negative value', function test( t ) { + t.equal( isNegativeFinite( -3.0 ), true, 'returns true' ); + t.end(); +}); + +tape( 'the function returns `false` if provided a number object, even if the number has a finite negative value', function test( t ) { + t.equal( isNegativeFinite( new Number( -5.0 ) ), false, 'returns false' ); + t.end(); +}); + +tape( 'the function returns `false` if not provided a finite negative number', function test( t ) { + var values; + var i; + + values = [ + '5', + 0.0, + new Number( 2.0 ), + 3.14, + null, + true, + void 0, + Number.NEGATIVE_INFINITY, + [], + {}, + function noop() {} + ]; + + for ( i = 0; i < values.length; i++ ) { + t.equal( isNegativeFinite( values[i] ), false, 'returns false when provided '+values[i] ); + } + t.end(); +}); From a16d9275bc5921abeb080bb5aa6e8a240fd03ad5 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 22:12:39 +0530 Subject: [PATCH 02/20] Update lib/node_modules/@stdlib/assert/is-negative-finite/lib/object.js Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- .../@stdlib/assert/is-negative-finite/lib/object.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/lib/object.js b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/object.js index 5ee9baf8e09a..34fac918c910 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/lib/object.js +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/object.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2024 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From f1c4efa2cdf6ae81c063c736b8ec4fff4727ca1b Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 22:12:56 +0530 Subject: [PATCH 03/20] Update lib/node_modules/@stdlib/assert/is-negative-finite/README.md Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- lib/node_modules/@stdlib/assert/is-negative-finite/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/README.md b/lib/node_modules/@stdlib/assert/is-negative-finite/README.md index d0e935d23644..38d1fe3979ff 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/README.md +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/README.md @@ -2,7 +2,7 @@ @license Apache-2.0 -Copyright (c) 2018 The Stdlib Authors. +Copyright (c) 2024 The Stdlib Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From ce1ce22bb4865fb83f15ae673f4911dce2e84d4a Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 22:13:47 +0530 Subject: [PATCH 04/20] Update lib/node_modules/@stdlib/assert/is-negative-finite/README.md Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- lib/node_modules/@stdlib/assert/is-negative-finite/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/README.md b/lib/node_modules/@stdlib/assert/is-negative-finite/README.md index 38d1fe3979ff..f32954d5c7e0 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/README.md +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/README.md @@ -104,6 +104,7 @@ bool = isNegativeFinite.isObject( new Number( -3.0 ) ); ```javascript var Number = require( '@stdlib/number/ctor' ); +var isNegativeFinite = require( '@stdlib/assert/is-negative-finite' ); var bool = isNegativeFinite( -5.0 ); // returns true From f47ccfa1d16f1ef09dac1b758cf990c447559574 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 22:14:08 +0530 Subject: [PATCH 05/20] Update lib/node_modules/@stdlib/assert/is-negative-finite/benchmark/benchmark.js Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- .../@stdlib/assert/is-negative-finite/benchmark/benchmark.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/benchmark/benchmark.js b/lib/node_modules/@stdlib/assert/is-negative-finite/benchmark/benchmark.js index 926e126eae69..d598938bf2ea 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/benchmark/benchmark.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2024 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From acc5e9c4026eb6dd28b8a280734df79f8bdc6514 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 22:14:43 +0530 Subject: [PATCH 06/20] Update lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- .../@stdlib/assert/is-negative-finite/docs/types/test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts b/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts index 28afd3cd3481..ddfaea09a583 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts @@ -47,7 +47,7 @@ import isNegativeFinite = require( './index' ); } -// Attached to main export is an isPrimitive method which returns a boolean... +// Attached to main export is an isObject method which returns a boolean... { // eslint-disable-next-line no-new-wrappers isNegativeFinite.isObject( new Number( -2 ) ); // $ExpectType boolean From 493d602c6e45d47c1964160027baa83add81a21f Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 22:14:57 +0530 Subject: [PATCH 07/20] Update lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/index.d.ts Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- .../@stdlib/assert/is-negative-finite/docs/types/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/index.d.ts b/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/index.d.ts index b511798b97aa..e0fef0965f66 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/index.d.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2019 The Stdlib Authors. +* Copyright (c) 2024 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 934c63d5e21c4f6b21134e6dc169b692f46bc768 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 22:15:09 +0530 Subject: [PATCH 08/20] Update lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- .../@stdlib/assert/is-negative-finite/docs/types/test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts b/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts index ddfaea09a583..6af9c99f09ab 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2019 The Stdlib Authors. +* Copyright (c) 2024 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 082026201c13ca4cef1356a3f11f31ed2e77e9e1 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 22:15:55 +0530 Subject: [PATCH 09/20] Update lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- .../@stdlib/assert/is-negative-finite/docs/types/test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts b/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts index 6af9c99f09ab..26f32d275f99 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/docs/types/test.ts @@ -46,7 +46,6 @@ import isNegativeFinite = require( './index' ); isNegativeFinite.isPrimitive( -2, 123 ); // $ExpectError } - // Attached to main export is an isObject method which returns a boolean... { // eslint-disable-next-line no-new-wrappers From 6b372618acce12dbb0d4da982e2bdaec4e055cb5 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 22:16:06 +0530 Subject: [PATCH 10/20] Update lib/node_modules/@stdlib/assert/is-negative-finite/test/test.object.js Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- .../@stdlib/assert/is-negative-finite/test/test.object.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.object.js b/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.object.js index ebd5c0b51c3e..bd6743f7c8e2 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.object.js +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.object.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2024 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 5468efd6cc11fbcee3c2e8d4c24edd122098d826 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 22:16:16 +0530 Subject: [PATCH 11/20] Update lib/node_modules/@stdlib/assert/is-negative-finite/lib/primitive.js Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- .../@stdlib/assert/is-negative-finite/lib/primitive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/lib/primitive.js b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/primitive.js index 02f04272b8a1..6542cd054b39 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/lib/primitive.js +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/primitive.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2024 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 165cb302b51b5d32d84d942facd7359485e4a4b6 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 22:16:24 +0530 Subject: [PATCH 12/20] Update lib/node_modules/@stdlib/assert/is-negative-finite/test/test.js Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- lib/node_modules/@stdlib/assert/is-negative-finite/test/test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.js b/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.js index c734049125fc..60bfcbf659f6 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.js +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2024 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 4b36c58c2c7af24f8d30c2d561c4fade9afc3557 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 22:16:32 +0530 Subject: [PATCH 13/20] Update lib/node_modules/@stdlib/assert/is-negative-finite/test/test.primitive.js Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- .../@stdlib/assert/is-negative-finite/test/test.primitive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.primitive.js b/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.primitive.js index b402f60c4153..57a8d3001449 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.primitive.js +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.primitive.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2024 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 99662dfe09c5b1194ce33d9b583ae01ffa4d24b7 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 22:16:54 +0530 Subject: [PATCH 14/20] Update lib/node_modules/@stdlib/assert/is-negative-finite/examples/index.js Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- .../@stdlib/assert/is-negative-finite/examples/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/examples/index.js b/lib/node_modules/@stdlib/assert/is-negative-finite/examples/index.js index 0d9266519b74..f9b711182a87 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/examples/index.js +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/examples/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2024 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 3ce38e911295af3ba8c773de138f41572ff93a09 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 22:17:16 +0530 Subject: [PATCH 15/20] Update lib/node_modules/@stdlib/assert/is-negative-finite/lib/index.js Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- lib/node_modules/@stdlib/assert/is-negative-finite/lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/lib/index.js b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/index.js index 653bd7650c81..f2d432df728f 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/lib/index.js +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2024 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 6496a6af8afaacfcb218dc18d5823143610be204 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 22:17:27 +0530 Subject: [PATCH 16/20] Update lib/node_modules/@stdlib/assert/is-negative-finite/lib/main.js Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- lib/node_modules/@stdlib/assert/is-negative-finite/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/lib/main.js b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/main.js index 423a93a23bae..d387eed0da0d 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/lib/main.js +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/main.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2024 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From f97babf07380203e2634ecf19ba48822d9f0a14b Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 22:17:36 +0530 Subject: [PATCH 17/20] Update lib/node_modules/@stdlib/assert/is-negative-finite/test/test.main.js Co-authored-by: Philipp Burckhardt Signed-off-by: GUNJ JOSHI --- .../@stdlib/assert/is-negative-finite/test/test.main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.main.js b/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.main.js index 2eb3ba849064..f708c771289a 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.main.js +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/test/test.main.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2024 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 22948fb100098e58ed58dbd3067159a1515289a6 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 22:18:44 +0530 Subject: [PATCH 18/20] Update object.js Signed-off-by: GUNJ JOSHI --- lib/node_modules/@stdlib/assert/is-negative-finite/lib/object.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/lib/object.js b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/object.js index 34fac918c910..e67c9ca0a15b 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/lib/object.js +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/object.js @@ -21,6 +21,7 @@ // MODULES // var isNumber = require( '@stdlib/assert/is-number' ).isObject; +var isFinite = require( '@stdlib/assert/is-finite' ).isObject; // eslint-disable-line stdlib/no-redeclare // MAIN // From a1449be7591ff9f7aa8cff2aa14198c1e14e7913 Mon Sep 17 00:00:00 2001 From: GUNJ JOSHI Date: Fri, 23 Feb 2024 22:19:18 +0530 Subject: [PATCH 19/20] Update primitive.js Signed-off-by: GUNJ JOSHI --- .../@stdlib/assert/is-negative-finite/lib/primitive.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/lib/primitive.js b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/primitive.js index 6542cd054b39..94f12997ed32 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/lib/primitive.js +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/lib/primitive.js @@ -21,6 +21,7 @@ // MODULES // var isNumber = require( '@stdlib/assert/is-number' ).isPrimitive; +var isFinite = require( '@stdlib/assert/is-finite' ).isPrimitive; // eslint-disable-line stdlib/no-redeclare // MAIN // From bf4b689e020b6f72ea101ecd2e73adf0a37b8444 Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Fri, 23 Feb 2024 14:36:34 -0500 Subject: [PATCH 20/20] Update lib/node_modules/@stdlib/assert/is-negative-finite/docs/repl.txt Signed-off-by: Philipp Burckhardt --- .../@stdlib/assert/is-negative-finite/docs/repl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-negative-finite/docs/repl.txt b/lib/node_modules/@stdlib/assert/is-negative-finite/docs/repl.txt index 586dee6cf058..3d7241b962cd 100644 --- a/lib/node_modules/@stdlib/assert/is-negative-finite/docs/repl.txt +++ b/lib/node_modules/@stdlib/assert/is-negative-finite/docs/repl.txt @@ -76,7 +76,7 @@ false > bool = {{alias}}.isObject( new Number( -3.0 ) ) true - > var bool = {{alias}}.isObject( Number.NEGATIVE_INFINITY ) + > bool = {{alias}}.isObject( Number.NEGATIVE_INFINITY ) false > bool = {{alias}}.isObject( new Number( Number.NEGATIVE_INFINITY ) ) false