From 325c7641d9cf4190f68722da34ecf296ba4dbdd9 Mon Sep 17 00:00:00 2001 From: orthodox-64 Date: Sun, 24 May 2026 00:32:36 +0530 Subject: [PATCH 1/3] feat: add plot/vega/base/assert/is-grid-align --- .../vega/base/assert/is-grid-align/README.md | 119 ++++++++++++++++++ .../is-grid-align/benchmark/benchmark.js | 62 +++++++++ .../base/assert/is-grid-align/docs/repl.txt | 28 +++++ .../is-grid-align/docs/types/index.d.ts | 45 +++++++ .../assert/is-grid-align/docs/types/test.ts | 34 +++++ .../assert/is-grid-align/examples/index.js | 37 ++++++ .../base/assert/is-grid-align/lib/index.js | 49 ++++++++ .../base/assert/is-grid-align/lib/main.js | 55 ++++++++ .../base/assert/is-grid-align/package.json | 70 +++++++++++ .../base/assert/is-grid-align/test/test.js | 78 ++++++++++++ 10 files changed, 577 insertions(+) create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/README.md create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/examples/index.js create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/index.js create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/main.js create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/package.json create mode 100644 lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/test/test.js diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/README.md b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/README.md new file mode 100644 index 000000000000..6da19f6087cf --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/README.md @@ -0,0 +1,119 @@ + + +# isGridAlign + +> Test if an input value is a supported [grid align][@stdlib/plot/vega/base/grid-aligns]. + + + +
+ +
+ + + + + +
+ +## Usage + +```javascript +var isGridAlign = require( '@stdlib/plot/vega/base/assert/is-grid-align' ); +``` + +#### isGridAlign( value ) + +Tests if an input value is a supported [grid align][@stdlib/plot/vega/base/grid-aligns]. + +```javascript +var bool = isGridAlign( 'all' ); +// returns true + +bool = isGridAlign( 'foo' ); +// returns false +``` + +
+ + + + + +
+ +
+ + + + + +
+ +## Examples + + + +```javascript +var isGridAlign = require( '@stdlib/plot/vega/base/assert/is-grid-align' ); + +var bool = isGridAlign( 'all' ); +// returns true + +bool = isGridAlign( 'each' ); +// returns true + +bool = isGridAlign( '' ); +// returns false + +bool = isGridAlign( 'foo' ); +// returns false +``` + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/benchmark/benchmark.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/benchmark/benchmark.js new file mode 100644 index 000000000000..9d9eaafaa0d2 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/benchmark/benchmark.js @@ -0,0 +1,62 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 bench = require( '@stdlib/bench' ); +var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive; +var pkg = require( './../package.json' ).name; +var isGridAlign = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var values; + var out; + var v; + var i; + + values = [ + 'all', + 'each', + + 'foo', + 'bar', + '', + 'beep', + 'boop' + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = values[ i%values.length ]; + out = isGridAlign( v ); + if ( typeof out !== 'boolean' ) { + b.fail( 'should return a boolean' ); + } + } + b.toc(); + if ( !isBoolean( out ) ) { + b.fail( 'should return a boolean' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/repl.txt b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/repl.txt new file mode 100644 index 000000000000..90153ac1fdec --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/repl.txt @@ -0,0 +1,28 @@ + +{{alias}}( value ) + Tests if an input value is a supported grid align. + + Parameters + ---------- + value: any + Value to test. + + Returns + ------- + bool: boolean + Boolean indicating if an input value is a supported grid align. + + Examples + -------- + > var bool = {{alias}}( 'all' ) + true + > bool = {{alias}}( 'each' ) + true + > bool = {{alias}}( '' ) + false + > bool = {{alias}}( 'beep' ) + false + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/index.d.ts b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/index.d.ts new file mode 100644 index 000000000000..68bd08b7d842 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/index.d.ts @@ -0,0 +1,45 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 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 + +/** +* Tests whether an input value is a supported grid align. +* +* @param v - value to test +* @returns boolean indicating whether an input value is a supported grid align +* +* @example +* var bool = isGridAlign( 'all' ); +* // returns true +* +* bool = isGridAlign( 'each' ); +* // returns true +* +* bool = isGridAlign( 'bar' ); +* // returns false +* +* bool = isGridAlign( 'foo' ); +* // returns false +*/ +declare function isGridAlign( v: any ): boolean; + + +// EXPORTS // + +export = isGridAlign; diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/test.ts b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/test.ts new file mode 100644 index 000000000000..97446f07c47c --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/test.ts @@ -0,0 +1,34 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2025 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 isGridAlign = require( './index' ); + + +// TESTS // + +// The function returns a boolean... +{ + isGridAlign( 'all' ); // $ExpectType boolean + isGridAlign( 'foo' ); // $ExpectType boolean +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + isGridAlign(); // $ExpectError + isGridAlign( undefined, 123 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/examples/index.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/examples/index.js new file mode 100644 index 000000000000..1b46c157f29b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/examples/index.js @@ -0,0 +1,37 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 isGridAlign = require( './../lib' ); + +var bool = isGridAlign( 'all' ); +console.log( bool ); +// => true + +bool = isGridAlign( 'each' ); +console.log( bool ); +// => true + +bool = isGridAlign( '' ); +console.log( bool ); +// => false + +bool = isGridAlign( 'foo' ); +console.log( bool ); +// => false diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/index.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/index.js new file mode 100644 index 000000000000..88276ead1bf2 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/index.js @@ -0,0 +1,49 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 whether an input value is a supported grid align. +* +* @module @stdlib/plot/vega/base/assert/is-grid-align +* +* @example +* var isGridAlign = require( '@stdlib/plot/vega/base/assert/is-grid-align' ); +* +* var bool = isGridAlign( 'all' ); +* // returns true +* +* bool = isGridAlign( 'each' ); +* // returns true +* +* bool = isGridAlign( 'bar' ); +* // returns false +* +* bool = isGridAlign( 'foo' ); +* // returns false +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/main.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/main.js new file mode 100644 index 000000000000..c6c04bc96fa5 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/main.js @@ -0,0 +1,55 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 contains = require( '@stdlib/array/base/assert/contains' ).factory; +var gridAligns = require( '@stdlib/plot/vega/base/grid-aligns' ); + + +// MAIN // + +/** +* Tests whether an input value is a supported grid align. +* +* @name isGridAlign +* @type {Function} +* @param {*} v - value to test +* @returns {boolean} boolean indicating whether an input value is a supported grid align +* +* @example +* var bool = isGridAlign( 'all' ); +* // returns true +* +* bool = isGridAlign( 'each' ); +* // returns true +* +* bool = isGridAlign( 'bar' ); +* // returns false +* +* bool = isGridAlign( 'foo' ); +* // returns false +*/ +var isGridAlign = contains( gridAligns() ); + + +// EXPORTS // + +module.exports = isGridAlign; diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/package.json b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/package.json new file mode 100644 index 000000000000..749ea5423d3e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/package.json @@ -0,0 +1,70 @@ +{ + "name": "@stdlib/plot/vega/base/assert/is-grid-align", + "version": "0.0.0", + "description": "Test if an input value is a supported grid align.", + "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", + "plot", + "base", + "vega", + "utilities", + "utility", + "utils", + "util", + "assert", + "test", + "check", + "is", + "valid", + "validate", + "validation", + "isvalid" + ], + "__stdlib__": {} +} diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/test/test.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/test/test.js new file mode 100644 index 000000000000..c6e8b4f16832 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/test/test.js @@ -0,0 +1,78 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2025 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 isGridAlign = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof isGridAlign, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns `true` if provided a supported grid align', function test( t ) { + var values; + var bool; + var i; + + values = [ + 'all', + 'each', + 'none' + ]; + for ( i = 0; i < values.length; i++ ) { + bool = isGridAlign( values[ i ] ); + t.strictEqual( bool, true, 'returns expected value when provided '+values[ i ] ); + } + t.end(); +}); + +tape( 'the function returns `false` if not provided a supported grid align', function test( t ) { + var values; + var bool; + var i; + + values = [ + '', + 'beep', + 'boop', + 'foo', + 'bar', + 5, + NaN, + true, + false, + null, + void 0, + [], + {}, + function noop() {} + ]; + for ( i = 0; i < values.length; i++ ) { + bool = isGridAlign( values[ i ] ); + t.strictEqual( bool, false, 'returns expected value when provided '+values[ i ] ); + } + t.end(); +}); From c61f926d7455b3def092a629950eaccd54fe888e Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Sat, 23 May 2026 19:06:52 +0000 Subject: [PATCH 2/3] chore: update copyright years --- .../@stdlib/plot/vega/base/assert/is-grid-align/README.md | 2 +- .../plot/vega/base/assert/is-grid-align/benchmark/benchmark.js | 2 +- .../plot/vega/base/assert/is-grid-align/docs/types/index.d.ts | 2 +- .../plot/vega/base/assert/is-grid-align/docs/types/test.ts | 2 +- .../plot/vega/base/assert/is-grid-align/examples/index.js | 2 +- .../@stdlib/plot/vega/base/assert/is-grid-align/lib/index.js | 2 +- .../@stdlib/plot/vega/base/assert/is-grid-align/lib/main.js | 2 +- .../@stdlib/plot/vega/base/assert/is-grid-align/test/test.js | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/README.md b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/README.md index 6da19f6087cf..e53374511cc8 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/README.md +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/README.md @@ -2,7 +2,7 @@ @license Apache-2.0 -Copyright (c) 2025 The Stdlib Authors. +Copyright (c) 2026 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. diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/benchmark/benchmark.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/benchmark/benchmark.js index 9d9eaafaa0d2..5bca7f4ceab0 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/benchmark/benchmark.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 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. diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/index.d.ts b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/index.d.ts index 68bd08b7d842..e82aba0b1b43 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/index.d.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 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. diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/test.ts b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/test.ts index 97446f07c47c..378b31ace35a 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/test.ts +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/test.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 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. diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/examples/index.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/examples/index.js index 1b46c157f29b..ffec87949d19 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/examples/index.js +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/examples/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 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. diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/index.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/index.js index 88276ead1bf2..67dd254d6feb 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/index.js +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 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. diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/main.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/main.js index c6c04bc96fa5..9ea11d2cfa42 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/main.js +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/main.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 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. diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/test/test.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/test/test.js index c6e8b4f16832..e01e8c35564e 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/test/test.js +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/test/test.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2025 The Stdlib Authors. +* Copyright (c) 2026 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 662256bcc9ef2154b77d22f1977f1c715ae4f5cc Mon Sep 17 00:00:00 2001 From: orthodox-64 Date: Wed, 27 May 2026 02:36:23 +0530 Subject: [PATCH 3/3] refactor: naming conventions --- .../README.md | 26 +++++++++---------- .../benchmark/benchmark.js | 4 +-- .../docs/repl.txt | 4 +-- .../docs/types/index.d.ts | 16 ++++++------ .../docs/types/test.ts | 10 +++---- .../examples/index.js | 10 +++---- .../lib/index.js | 14 +++++----- .../lib/main.js | 20 +++++++------- .../package.json | 4 +-- .../test/test.js | 12 ++++----- 10 files changed, 60 insertions(+), 60 deletions(-) rename lib/node_modules/@stdlib/plot/vega/base/assert/{is-grid-align => is-grid-alignment}/README.md (72%) rename lib/node_modules/@stdlib/plot/vega/base/assert/{is-grid-align => is-grid-alignment}/benchmark/benchmark.js (94%) rename lib/node_modules/@stdlib/plot/vega/base/assert/{is-grid-align => is-grid-alignment}/docs/repl.txt (85%) rename lib/node_modules/@stdlib/plot/vega/base/assert/{is-grid-align => is-grid-alignment}/docs/types/index.d.ts (73%) rename lib/node_modules/@stdlib/plot/vega/base/assert/{is-grid-align => is-grid-alignment}/docs/types/test.ts (76%) rename lib/node_modules/@stdlib/plot/vega/base/assert/{is-grid-align => is-grid-alignment}/examples/index.js (81%) rename lib/node_modules/@stdlib/plot/vega/base/assert/{is-grid-align => is-grid-alignment}/lib/index.js (70%) rename lib/node_modules/@stdlib/plot/vega/base/assert/{is-grid-align => is-grid-alignment}/lib/main.js (69%) rename lib/node_modules/@stdlib/plot/vega/base/assert/{is-grid-align => is-grid-alignment}/package.json (94%) rename lib/node_modules/@stdlib/plot/vega/base/assert/{is-grid-align => is-grid-alignment}/test/test.js (83%) diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/README.md b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/README.md similarity index 72% rename from lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/README.md rename to lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/README.md index e53374511cc8..99cac822336f 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/README.md +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/README.md @@ -18,9 +18,9 @@ limitations under the License. --> -# isGridAlign +# isGridAlignment -> Test if an input value is a supported [grid align][@stdlib/plot/vega/base/grid-aligns]. +> Test if an input value is a supported [grid alignment][@stdlib/plot/vega/base/grid-alignments]. @@ -37,18 +37,18 @@ limitations under the License. ## Usage ```javascript -var isGridAlign = require( '@stdlib/plot/vega/base/assert/is-grid-align' ); +var isGridAlignment = require( '@stdlib/plot/vega/base/assert/is-grid-alignment' ); ``` -#### isGridAlign( value ) +#### isGridAlignment( value ) -Tests if an input value is a supported [grid align][@stdlib/plot/vega/base/grid-aligns]. +Tests if an input value is a supported [grid alignment][@stdlib/plot/vega/base/grid-alignments]. ```javascript -var bool = isGridAlign( 'all' ); +var bool = isGridAlignment( 'all' ); // returns true -bool = isGridAlign( 'foo' ); +bool = isGridAlignment( 'foo' ); // returns false ``` @@ -73,18 +73,18 @@ bool = isGridAlign( 'foo' ); ```javascript -var isGridAlign = require( '@stdlib/plot/vega/base/assert/is-grid-align' ); +var isGridAlignment = require( '@stdlib/plot/vega/base/assert/is-grid-alignment' ); -var bool = isGridAlign( 'all' ); +var bool = isGridAlignment( 'all' ); // returns true -bool = isGridAlign( 'each' ); +bool = isGridAlignment( 'each' ); // returns true -bool = isGridAlign( '' ); +bool = isGridAlignment( '' ); // returns false -bool = isGridAlign( 'foo' ); +bool = isGridAlignment( 'foo' ); // returns false ``` @@ -112,7 +112,7 @@ bool = isGridAlign( 'foo' ); diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/benchmark/benchmark.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/benchmark/benchmark.js similarity index 94% rename from lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/benchmark/benchmark.js rename to lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/benchmark/benchmark.js index 5bca7f4ceab0..98e301226e0f 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/benchmark/benchmark.js @@ -23,7 +23,7 @@ var bench = require( '@stdlib/bench' ); var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive; var pkg = require( './../package.json' ).name; -var isGridAlign = require( './../lib' ); +var isGridAlignment = require( './../lib' ); // MAIN // @@ -48,7 +48,7 @@ bench( pkg, function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { v = values[ i%values.length ]; - out = isGridAlign( v ); + out = isGridAlignment( v ); if ( typeof out !== 'boolean' ) { b.fail( 'should return a boolean' ); } diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/repl.txt b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/docs/repl.txt similarity index 85% rename from lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/repl.txt rename to lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/docs/repl.txt index 90153ac1fdec..c8a626d4ac29 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/repl.txt +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/docs/repl.txt @@ -1,6 +1,6 @@ {{alias}}( value ) - Tests if an input value is a supported grid align. + Tests if an input value is a supported grid alignment. Parameters ---------- @@ -10,7 +10,7 @@ Returns ------- bool: boolean - Boolean indicating if an input value is a supported grid align. + Boolean indicating if an input value is a supported grid alignment. Examples -------- diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/index.d.ts b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/docs/types/index.d.ts similarity index 73% rename from lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/index.d.ts rename to lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/docs/types/index.d.ts index e82aba0b1b43..7b94ec2c11c1 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/docs/types/index.d.ts @@ -19,27 +19,27 @@ // TypeScript Version: 4.1 /** -* Tests whether an input value is a supported grid align. +* Tests whether an input value is a supported grid alignment. * * @param v - value to test -* @returns boolean indicating whether an input value is a supported grid align +* @returns boolean indicating whether an input value is a supported grid alignment * * @example -* var bool = isGridAlign( 'all' ); +* var bool = isGridAlignment( 'all' ); * // returns true * -* bool = isGridAlign( 'each' ); +* bool = isGridAlignment( 'each' ); * // returns true * -* bool = isGridAlign( 'bar' ); +* bool = isGridAlignment( 'bar' ); * // returns false * -* bool = isGridAlign( 'foo' ); +* bool = isGridAlignment( 'foo' ); * // returns false */ -declare function isGridAlign( v: any ): boolean; +declare function isGridAlignment( v: any ): boolean; // EXPORTS // -export = isGridAlign; +export = isGridAlignment; diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/test.ts b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/docs/types/test.ts similarity index 76% rename from lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/test.ts rename to lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/docs/types/test.ts index 378b31ace35a..03ffb36815e6 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/docs/types/test.ts +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/docs/types/test.ts @@ -16,19 +16,19 @@ * limitations under the License. */ -import isGridAlign = require( './index' ); +import isGridAlignment = require( './index' ); // TESTS // // The function returns a boolean... { - isGridAlign( 'all' ); // $ExpectType boolean - isGridAlign( 'foo' ); // $ExpectType boolean + isGridAlignment( 'all' ); // $ExpectType boolean + isGridAlignment( 'foo' ); // $ExpectType boolean } // The compiler throws an error if the function is provided an unsupported number of arguments... { - isGridAlign(); // $ExpectError - isGridAlign( undefined, 123 ); // $ExpectError + isGridAlignment(); // $ExpectError + isGridAlignment( undefined, 123 ); // $ExpectError } diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/examples/index.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/examples/index.js similarity index 81% rename from lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/examples/index.js rename to lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/examples/index.js index ffec87949d19..3cf430feeae7 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/examples/index.js +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/examples/index.js @@ -18,20 +18,20 @@ 'use strict'; -var isGridAlign = require( './../lib' ); +var isGridAlignment = require( './../lib' ); -var bool = isGridAlign( 'all' ); +var bool = isGridAlignment( 'all' ); console.log( bool ); // => true -bool = isGridAlign( 'each' ); +bool = isGridAlignment( 'each' ); console.log( bool ); // => true -bool = isGridAlign( '' ); +bool = isGridAlignment( '' ); console.log( bool ); // => false -bool = isGridAlign( 'foo' ); +bool = isGridAlignment( 'foo' ); console.log( bool ); // => false diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/index.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/lib/index.js similarity index 70% rename from lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/index.js rename to lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/lib/index.js index 67dd254d6feb..7762fd75d203 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/index.js +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/lib/index.js @@ -19,23 +19,23 @@ 'use strict'; /** -* Test whether an input value is a supported grid align. +* Test whether an input value is a supported grid alignment. * -* @module @stdlib/plot/vega/base/assert/is-grid-align +* @module @stdlib/plot/vega/base/assert/is-grid-alignment * * @example -* var isGridAlign = require( '@stdlib/plot/vega/base/assert/is-grid-align' ); +* var isGridAlignment = require( '@stdlib/plot/vega/base/assert/is-grid-alignment' ); * -* var bool = isGridAlign( 'all' ); +* var bool = isGridAlignment( 'all' ); * // returns true * -* bool = isGridAlign( 'each' ); +* bool = isGridAlignment( 'each' ); * // returns true * -* bool = isGridAlign( 'bar' ); +* bool = isGridAlignment( 'bar' ); * // returns false * -* bool = isGridAlign( 'foo' ); +* bool = isGridAlignment( 'foo' ); * // returns false */ diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/main.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/lib/main.js similarity index 69% rename from lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/main.js rename to lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/lib/main.js index 9ea11d2cfa42..9d79d36c29cb 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/lib/main.js +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/lib/main.js @@ -21,35 +21,35 @@ // MODULES // var contains = require( '@stdlib/array/base/assert/contains' ).factory; -var gridAligns = require( '@stdlib/plot/vega/base/grid-aligns' ); +var gridAlignments = require( '@stdlib/plot/vega/base/grid-alignments' ); // MAIN // /** -* Tests whether an input value is a supported grid align. +* Tests whether an input value is a supported grid alignment. * -* @name isGridAlign +* @name isGridAlignment * @type {Function} * @param {*} v - value to test -* @returns {boolean} boolean indicating whether an input value is a supported grid align +* @returns {boolean} boolean indicating whether an input value is a supported grid alignment * * @example -* var bool = isGridAlign( 'all' ); +* var bool = isGridAlignment( 'all' ); * // returns true * -* bool = isGridAlign( 'each' ); +* bool = isGridAlignment( 'each' ); * // returns true * -* bool = isGridAlign( 'bar' ); +* bool = isGridAlignment( 'bar' ); * // returns false * -* bool = isGridAlign( 'foo' ); +* bool = isGridAlignment( 'foo' ); * // returns false */ -var isGridAlign = contains( gridAligns() ); +var isGridAlignment = contains( gridAlignments() ); // EXPORTS // -module.exports = isGridAlign; +module.exports = isGridAlignment; diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/package.json b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/package.json similarity index 94% rename from lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/package.json rename to lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/package.json index 749ea5423d3e..63cb42722284 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/package.json +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/package.json @@ -1,7 +1,7 @@ { - "name": "@stdlib/plot/vega/base/assert/is-grid-align", + "name": "@stdlib/plot/vega/base/assert/is-grid-alignment", "version": "0.0.0", - "description": "Test if an input value is a supported grid align.", + "description": "Test if an input value is a supported grid alignment.", "license": "Apache-2.0", "author": { "name": "The Stdlib Authors", diff --git a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/test/test.js b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/test/test.js similarity index 83% rename from lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/test/test.js rename to lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/test/test.js index e01e8c35564e..94cf070dd438 100644 --- a/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-align/test/test.js +++ b/lib/node_modules/@stdlib/plot/vega/base/assert/is-grid-alignment/test/test.js @@ -21,18 +21,18 @@ // MODULES // var tape = require( 'tape' ); -var isGridAlign = require( './../lib' ); +var isGridAlignment = require( './../lib' ); // TESTS // tape( 'main export is a function', function test( t ) { t.ok( true, __filename ); - t.strictEqual( typeof isGridAlign, 'function', 'main export is a function' ); + t.strictEqual( typeof isGridAlignment, 'function', 'main export is a function' ); t.end(); }); -tape( 'the function returns `true` if provided a supported grid align', function test( t ) { +tape( 'the function returns `true` if provided a supported grid alignment', function test( t ) { var values; var bool; var i; @@ -43,13 +43,13 @@ tape( 'the function returns `true` if provided a supported grid align', function 'none' ]; for ( i = 0; i < values.length; i++ ) { - bool = isGridAlign( values[ i ] ); + bool = isGridAlignment( values[ i ] ); t.strictEqual( bool, true, 'returns expected value when provided '+values[ i ] ); } t.end(); }); -tape( 'the function returns `false` if not provided a supported grid align', function test( t ) { +tape( 'the function returns `false` if not provided a supported grid alignment', function test( t ) { var values; var bool; var i; @@ -71,7 +71,7 @@ tape( 'the function returns `false` if not provided a supported grid align', fun function noop() {} ]; for ( i = 0; i < values.length; i++ ) { - bool = isGridAlign( values[ i ] ); + bool = isGridAlignment( values[ i ] ); t.strictEqual( bool, false, 'returns expected value when provided '+values[ i ] ); } t.end();