diff --git a/lib/node_modules/@stdlib/plot/vega/transform/label/methods/README.md b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/README.md new file mode 100644 index 000000000000..a6f655917431 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/README.md @@ -0,0 +1,117 @@ + + +# labelMethods + +> List of supported Vega label transform labeling methods. + + + +
+ +
+ + + + + +
+ +## Usage + +```javascript +var labelMethods = require( '@stdlib/plot/vega/transform/label/methods' ); +``` + +#### labelMethods() + +Returns a list of label transform labeling methods. + +```javascript +var out = labelMethods(); +// returns [ 'floodfill', 'naive', 'reduced-search' ] +``` + +
+ + + + + +
+ +
+ + + + + +
+ +## Examples + + + +```javascript +var contains = require( '@stdlib/array/base/assert/contains' ).factory; +var labelMethods = require( '@stdlib/plot/vega/transform/label/methods' ); + +var isLabelMethod = contains( labelMethods() ); + +var bool = isLabelMethod( 'naive' ); +// returns true + +bool = isLabelMethod( 'floodfill' ); +// returns true + +bool = isLabelMethod( 'beep' ); +// returns false + +bool = isLabelMethod( 'boop' ); +// returns false +``` + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/plot/vega/transform/label/methods/benchmark/benchmark.js b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/benchmark/benchmark.js new file mode 100644 index 000000000000..0a296bbc5519 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/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 labelMethods = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var out; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + out = labelMethods(); + 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/transform/label/methods/docs/repl.txt b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/docs/repl.txt new file mode 100644 index 000000000000..7818a47836a8 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/docs/repl.txt @@ -0,0 +1,17 @@ + +{{alias}}() + Returns a list of label transform labeling methods. + + Returns + ------- + out: Array + List of label transform labeling methods. + + Examples + -------- + > var out = {{alias}}() + [ 'floodfill', 'naive', 'reduced-search' ] + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/plot/vega/transform/label/methods/docs/types/index.d.ts b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/docs/types/index.d.ts new file mode 100644 index 000000000000..d82af08cca97 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/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 label transform labeling methods. +* +* @returns list of label transform labeling methods +* +* @example +* var list = labelMethods(); +* // returns [ 'floodfill', 'naive', 'reduced-search' ] +*/ +declare function labelMethods(): Array; + + +// EXPORTS // + +export = labelMethods; diff --git a/lib/node_modules/@stdlib/plot/vega/transform/label/methods/docs/types/test.ts b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/docs/types/test.ts new file mode 100644 index 000000000000..9763d29b12f3 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/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 labelMethods = require( './index' ); + + +// TESTS // + +// The function returns an array of strings... +{ + labelMethods(); // $ExpectType string[] +} + +// The compiler throws an error if the function is provided any arguments... +{ + labelMethods( 9 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/plot/vega/transform/label/methods/examples/index.js b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/examples/index.js new file mode 100644 index 000000000000..905e60c234f7 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/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 labelMethods = require( './../lib' ); + +var isLabelMethod = contains( labelMethods() ); + +var bool = isLabelMethod( 'naive' ); +console.log( bool ); +// => true + +bool = isLabelMethod( 'floodfill' ); +console.log( bool ); +// => true + +bool = isLabelMethod( 'beep' ); +console.log( bool ); +// => false + +bool = isLabelMethod( 'boop' ); +console.log( bool ); +// => false diff --git a/lib/node_modules/@stdlib/plot/vega/transform/label/methods/lib/data.json b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/lib/data.json new file mode 100644 index 000000000000..3a3ff6b33611 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/lib/data.json @@ -0,0 +1,5 @@ +[ + "floodfill", + "naive", + "reduced-search" +] diff --git a/lib/node_modules/@stdlib/plot/vega/transform/label/methods/lib/index.js b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/lib/index.js new file mode 100644 index 000000000000..a2681a89fabd --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/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 label transform labeling methods. +* +* @module @stdlib/plot/vega/transform/label/methods +* +* @example +* var labelMethods = require( '@stdlib/plot/vega/transform/label/methods' ); +* +* var out = labelMethods(); +* // returns [ 'floodfill', 'naive', 'reduced-search' ] +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/plot/vega/transform/label/methods/lib/main.js b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/lib/main.js new file mode 100644 index 000000000000..48aa4a924f34 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/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 label transform labeling methods. +* +* @returns {StringArray} list of label transform labeling methods +* +* @example +* var out = labelMethods(); +* // returns [ 'floodfill', 'naive', 'reduced-search' ] +*/ +function labelMethods() { + return DATA.slice(); +} + + +// EXPORTS // + +module.exports = labelMethods; diff --git a/lib/node_modules/@stdlib/plot/vega/transform/label/methods/package.json b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/package.json new file mode 100644 index 000000000000..4dd9c82bec5a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/package.json @@ -0,0 +1,64 @@ +{ + "name": "@stdlib/plot/vega/transform/label/methods", + "version": "0.0.0", + "description": "List of supported Vega label transform labeling methods.", + "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", + "transform", + "label", + "method", + "utilities", + "utility", + "utils", + "util" + ], + "__stdlib__": {} +} diff --git a/lib/node_modules/@stdlib/plot/vega/transform/label/methods/test/test.js b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/test/test.js new file mode 100644 index 000000000000..3fbc1fb47345 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/transform/label/methods/test/test.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 tape = require( 'tape' ); +var labelMethods = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof labelMethods, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns a list of label transform labeling methods', function test( t ) { + var expected; + var actual; + + expected = [ + 'floodfill', + 'naive', + 'reduced-search' + ]; + actual = labelMethods(); + + t.deepEqual( actual, expected, 'returns expected value' ); + t.end(); +});