diff --git a/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/README.md b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/README.md new file mode 100644 index 000000000000..414eaa46e7ef --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/README.md @@ -0,0 +1,117 @@ + + +# axisTickStyles + +> List of supported Vega axis tick styles. + + + +
+ +
+ + + + + +
+ +## Usage + +```javascript +var axisTickStyles = require( '@stdlib/plot/vega/axis/tick-styles' ); +``` + +#### axisTickStyles() + +Returns a list of axis tick styles. + +```javascript +var out = axisTickStyles(); +// returns [ 'center', 'extent' ] +``` + +
+ + + + + +
+ +
+ + + + + +
+ +## Examples + + + +```javascript +var contains = require( '@stdlib/array/base/assert/contains' ).factory; +var axisTickStyles = require( '@stdlib/plot/vega/axis/tick-styles' ); + +var isAxisTickStyle = contains( axisTickStyles() ); + +var bool = isAxisTickStyle( 'center' ); +// returns true + +bool = isAxisTickStyle( 'extent' ); +// returns true + +bool = isAxisTickStyle( 'beep' ); +// returns false + +bool = isAxisTickStyle( 'boop' ); +// returns false +``` + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/benchmark/benchmark.js b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/benchmark/benchmark.js new file mode 100644 index 000000000000..f16a1835284c --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/benchmark/benchmark.js @@ -0,0 +1,48 @@ +/** +* @license Apache-2.0 +* +* 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. +* 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 isStringArray = require( '@stdlib/assert/is-string-array' ).primitives; +var pkg = require( './../package.json' ).name; +var axisTickStyles = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var out; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + out = axisTickStyles(); + if ( out.length < 2 ) { + b.fail( 'should return an array' ); + } + } + b.toc(); + if ( !isStringArray( out ) ) { + b.fail( 'should return an array of strings' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/docs/repl.txt b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/docs/repl.txt new file mode 100644 index 000000000000..ef776fb56134 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/docs/repl.txt @@ -0,0 +1,17 @@ + +{{alias}}() + Returns a list of axis tick styles. + + Returns + ------- + out: Array + List of axis tick styles. + + Examples + -------- + > var out = {{alias}}() + [ 'center', 'extent' ] + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/docs/types/index.d.ts b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/docs/types/index.d.ts new file mode 100644 index 000000000000..6184081ce83f --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/docs/types/index.d.ts @@ -0,0 +1,35 @@ +/* +* @license Apache-2.0 +* +* 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. +* 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 + +/** +* Returns a list of axis tick styles. +* +* @returns list of axis tick styles +* +* @example +* var list = axisTickStyles(); +* // returns [ 'center', 'extent' ] +*/ +declare function axisTickStyles(): Array; + + +// EXPORTS // + +export = axisTickStyles; diff --git a/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/docs/types/test.ts b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/docs/types/test.ts new file mode 100644 index 000000000000..fe4091f08020 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/docs/types/test.ts @@ -0,0 +1,32 @@ +/* +* @license Apache-2.0 +* +* 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. +* 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 axisTickStyles = require( './index' ); + + +// TESTS // + +// The function returns an array of strings... +{ + axisTickStyles(); // $ExpectType string[] +} + +// The compiler throws an error if the function is provided any arguments... +{ + axisTickStyles( 9 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/examples/index.js b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/examples/index.js new file mode 100644 index 000000000000..bfeb3b1f2beb --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/examples/index.js @@ -0,0 +1,40 @@ +/** +* @license Apache-2.0 +* +* 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. +* 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 contains = require( '@stdlib/array/base/assert/contains' ).factory; +var axisTickStyles = require( './../lib' ); + +var isAxisTickStyle = contains( axisTickStyles() ); + +var bool = isAxisTickStyle( 'center' ); +console.log( bool ); +// => true + +bool = isAxisTickStyle( 'extent' ); +console.log( bool ); +// => true + +bool = isAxisTickStyle( 'beep' ); +console.log( bool ); +// => false + +bool = isAxisTickStyle( 'boop' ); +console.log( bool ); +// => false diff --git a/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/lib/data.json b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/lib/data.json new file mode 100644 index 000000000000..b777d57d2399 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/lib/data.json @@ -0,0 +1,4 @@ +[ + "center", + "extent" +] diff --git a/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/lib/index.js b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/lib/index.js new file mode 100644 index 000000000000..d7140b51435e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/lib/index.js @@ -0,0 +1,40 @@ +/** +* @license Apache-2.0 +* +* 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. +* 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'; + +/** +* Return a list of axis tick styles. +* +* @module @stdlib/plot/vega/axis/tick-styles +* +* @example +* var axisTickStyles = require( '@stdlib/plot/vega/axis/tick-styles' ); +* +* var out = axisTickStyles(); +* // returns [ 'center', 'extent' ] +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/lib/main.js b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/lib/main.js new file mode 100644 index 000000000000..31bae755aae3 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/lib/main.js @@ -0,0 +1,44 @@ +/** +* @license Apache-2.0 +* +* 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. +* 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 DATA = require( './data.json' ); + + +// MAIN // + +/** +* Returns a list of axis tick styles. +* +* @returns {StringArray} list of axis tick styles +* +* @example +* var out = tickStyles(); +* // returns [ 'center', 'extent' ] +*/ +function tickStyles() { + return DATA.slice(); +} + + +// EXPORTS // + +module.exports = tickStyles; diff --git a/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/package.json b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/package.json new file mode 100644 index 000000000000..8cf257b9a13b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/package.json @@ -0,0 +1,64 @@ +{ + "name": "@stdlib/plot/vega/axis/tick-styles", + "version": "0.0.0", + "description": "List of supported Vega axis tick styles.", + "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", + "vega", + "axis", + "tick", + "styles", + "utilities", + "utility", + "utils", + "util" + ], + "__stdlib__": {} +} diff --git a/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/test/test.js b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/test/test.js new file mode 100644 index 000000000000..d20e7d285dba --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/axis/tick-styles/test/test.js @@ -0,0 +1,47 @@ +/** +* @license Apache-2.0 +* +* 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. +* 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 axisTickStyles = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof axisTickStyles, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns a list of axis tick styles', function test( t ) { + var expected; + var actual; + + expected = [ + 'center', + 'extent' + ]; + actual = axisTickStyles(); + + t.deepEqual( actual, expected, 'returns expected value' ); + t.end(); +});