From 7b02c160d8c9ecf6742ea0178c733f938e0c94c4 Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Thu, 26 Sep 2024 09:06:17 -0400 Subject: [PATCH] chore: minor clean-up --- .../@stdlib/array/base/cusome/lib/assign.js | 5 ++--- .../array/base/cusome/test/test.assign.js | 14 +++++--------- .../fmtprodmsg-factory/docs/types/test.ts | 4 ++-- .../error/tools/fmtprodmsg/docs/types/test.ts | 2 +- .../@stdlib/fs/rename/docs/types/test.ts | 18 +++++++++--------- .../slice/base/shape/docs/types/test.ts | 2 +- 6 files changed, 20 insertions(+), 25 deletions(-) diff --git a/lib/node_modules/@stdlib/array/base/cusome/lib/assign.js b/lib/node_modules/@stdlib/array/base/cusome/lib/assign.js index c58f1a37974..fae5470375a 100644 --- a/lib/node_modules/@stdlib/array/base/cusome/lib/assign.js +++ b/lib/node_modules/@stdlib/array/base/cusome/lib/assign.js @@ -70,7 +70,7 @@ function indexed( x, n, y, stride, offset ) { } /** -* Cumulatively tests whether at least `n` array elements in accessor array are truthy. +* Cumulatively tests whether at least `n` array elements in an accessor array are truthy. * * @private * @param {Object} x - input array object @@ -128,7 +128,6 @@ function accessors( x, n, y, stride, offset ) { flg = true; } } - yset( ydata, io, flg ); io += stride; } @@ -136,7 +135,7 @@ function accessors( x, n, y, stride, offset ) { } /** -* Cumulatively tests whether at least `n` array elements in a provided complex number are truthy and assigns results to provided output array. +* Cumulatively tests whether at least `n` array elements in a provided complex number array are truthy. * * @private * @param {Collection} x - array containing interleaved real and imaginary components diff --git a/lib/node_modules/@stdlib/array/base/cusome/test/test.assign.js b/lib/node_modules/@stdlib/array/base/cusome/test/test.assign.js index 367e35861c3..5ffe54e83ae 100644 --- a/lib/node_modules/@stdlib/array/base/cusome/test/test.assign.js +++ b/lib/node_modules/@stdlib/array/base/cusome/test/test.assign.js @@ -16,6 +16,8 @@ * limitations under the License. */ +/* eslint-disable max-len */ + 'use strict'; // MODULES // @@ -166,9 +168,7 @@ tape( 'the function cumulatively tests whether at least `n` array elements are t y = [ false, null, false, null, false, null, false, null, false, null ]; actual = cusome( x, 2, y, 2, 0 ); - expected = [ - false, null, false, null, false, null, false, null, false, null - ]; + expected = [ false, null, false, null, false, null, false, null, false, null ]; t.strictEqual( actual, y, 'returns expected value' ); t.deepEqual( actual, expected, 'returns expected value' ); @@ -209,9 +209,7 @@ tape( 'the function cumulatively tests whether at least `n` array elements are t var x; var y; - x = new Complex128Array([ - 1.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0, 0.0, 1.0 - ]); + x = new Complex128Array([ 1.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0, 0.0, 1.0 ]); y = [ false, true, false, true, false ]; actual = cusome( x, 1, y, 1, 0 ); @@ -220,9 +218,7 @@ tape( 'the function cumulatively tests whether at least `n` array elements are t t.strictEqual( actual, y, 'returns expected value' ); t.deepEqual( actual, expected, 'returns expected value' ); - x = new Complex128Array([ - 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0 - ]); + x = new Complex128Array([ 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0 ]); y = [ false, null, false, null, false, null, false, null, false, null ]; actual = cusome( x, 2, y, 2, 0 ); diff --git a/lib/node_modules/@stdlib/error/tools/fmtprodmsg-factory/docs/types/test.ts b/lib/node_modules/@stdlib/error/tools/fmtprodmsg-factory/docs/types/test.ts index dbb02b58944..1e2125b5883 100644 --- a/lib/node_modules/@stdlib/error/tools/fmtprodmsg-factory/docs/types/test.ts +++ b/lib/node_modules/@stdlib/error/tools/fmtprodmsg-factory/docs/types/test.ts @@ -21,7 +21,7 @@ import fmtprodmsgFactory = require( './index' ); // TESTS // -// The function returns an returns an error formatting function... +// The function returns an error formatting function... { fmtprodmsgFactory( {} ); // $ExpectType FormatProdErrorMsgFunction } @@ -42,7 +42,7 @@ import fmtprodmsgFactory = require( './index' ); fcn( '3', 'wrong_type' ); // $ExpectType string } -// The compiler throws an error if the function is provided an `url` option which is not a string... +// The compiler throws an error if the function is provided a `url` option which is not a string... { fmtprodmsgFactory( { 'url': true } ); // $ExpectError fmtprodmsgFactory( { 'url': false } ); // $ExpectError diff --git a/lib/node_modules/@stdlib/error/tools/fmtprodmsg/docs/types/test.ts b/lib/node_modules/@stdlib/error/tools/fmtprodmsg/docs/types/test.ts index 272fda9a69c..1b20be137e1 100644 --- a/lib/node_modules/@stdlib/error/tools/fmtprodmsg/docs/types/test.ts +++ b/lib/node_modules/@stdlib/error/tools/fmtprodmsg/docs/types/test.ts @@ -21,7 +21,7 @@ import fmtprodmsg = require( './index' ); // TESTS // -// The function returns an string... +// The function returns a string... { fmtprodmsg( '1' ); // $ExpectType string fmtprodmsg( '3', 'wrong_type' ); // $ExpectType string diff --git a/lib/node_modules/@stdlib/fs/rename/docs/types/test.ts b/lib/node_modules/@stdlib/fs/rename/docs/types/test.ts index 35f9d9adbab..f18b6b5a967 100644 --- a/lib/node_modules/@stdlib/fs/rename/docs/types/test.ts +++ b/lib/node_modules/@stdlib/fs/rename/docs/types/test.ts @@ -18,7 +18,7 @@ import rename = require( './index' ); -const done = ( error: Error | null ) => { +const done = ( error: Error | null ): void => { if ( error ) { throw error; } @@ -94,14 +94,14 @@ const done = ( error: Error | null ) => { // The compiler throws an error if the `sync` method is provided a second argument which is not a string... { - rename.sync( './beep/boop.txt', 1, ); // $ExpectError - rename.sync( './beep/boop.txt', false, ); // $ExpectError - rename.sync( './beep/boop.txt', true, ); // $ExpectError - rename.sync( './beep/boop.txt', null, ); // $ExpectError - rename.sync( './beep/boop.txt', undefined, ); // $ExpectError - rename.sync( './beep/boop.txt', [], ); // $ExpectError - rename.sync( './beep/boop.txt', {}, ); // $ExpectError - rename.sync( './beep/boop.txt', ( x: number ): number => x, ); // $ExpectError + rename.sync( './beep/boop.txt', 1 ); // $ExpectError + rename.sync( './beep/boop.txt', false ); // $ExpectError + rename.sync( './beep/boop.txt', true ); // $ExpectError + rename.sync( './beep/boop.txt', null ); // $ExpectError + rename.sync( './beep/boop.txt', undefined ); // $ExpectError + rename.sync( './beep/boop.txt', [] ); // $ExpectError + rename.sync( './beep/boop.txt', {} ); // $ExpectError + rename.sync( './beep/boop.txt', ( x: number ): number => x ); // $ExpectError } // The compiler throws an error if the `sync` method is provided an unsupported number of arguments... diff --git a/lib/node_modules/@stdlib/slice/base/shape/docs/types/test.ts b/lib/node_modules/@stdlib/slice/base/shape/docs/types/test.ts index 00050023c13..deb9125f6a6 100644 --- a/lib/node_modules/@stdlib/slice/base/shape/docs/types/test.ts +++ b/lib/node_modules/@stdlib/slice/base/shape/docs/types/test.ts @@ -22,7 +22,7 @@ import sliceShape = require( './index' ); // TESTS // -// The function returns a number... +// The function returns an array of numbers... { sliceShape( new MultiSlice( null, null ) ); // $ExpectType number[] sliceShape( new MultiSlice( null, null, null ) ); // $ExpectType number[]