From 2814e395383420256abcaa3e73e3c731df225dfe Mon Sep 17 00:00:00 2001 From: Mahi Date: Sat, 31 Jan 2026 00:06:20 +0530 Subject: [PATCH 1/5] tools/snippets: add documentation and basic tests for placeholder snippet function --- tools/snippets/lib/index.js | 32 +++++++------------------------- tools/snippets/lib/main.js | 37 +++++++++++-------------------------- tools/snippets/test/test.js | 28 ++++++---------------------- 3 files changed, 24 insertions(+), 73 deletions(-) diff --git a/tools/snippets/lib/index.js b/tools/snippets/lib/index.js index 5ec20be28792..83fc0b376ff7 100644 --- a/tools/snippets/lib/index.js +++ b/tools/snippets/lib/index.js @@ -1,40 +1,22 @@ -/** -* @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'; /** -* TODO: description +* Example snippet utility. * -* @module @stdlib/ +* @module @stdlib/tools/snippets * * @example -* var TODO = require( '@stdlib/' ); +* var snippet = require( '@stdlib/tools/snippets' ); * -* var v = TODO( 0.0 ); -* // returns TODO +* var v = snippet( 3.0 ); +* // returns 3.0 */ // MODULES // -var TODO = require( './main.js' ); +var snippet = require( './main.js' ); // EXPORTS // -module.exports = TODO; +module.exports = snippet; diff --git a/tools/snippets/lib/main.js b/tools/snippets/lib/main.js index c9409542e1e4..49d1ff3748aa 100644 --- a/tools/snippets/lib/main.js +++ b/tools/snippets/lib/main.js @@ -1,40 +1,25 @@ -/** -* @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'; // MAIN // /** -* TODO: description +* Example snippet function which returns the input value unchanged. +* +* This function exists as a simple demonstration utility for tooling +* and documentation examples. * -* @param {} TODO - TODO: param desc -* @returns {} TODO: desc +* @param {number} x - input value +* @returns {number} input value * * @example -* var v = TODO( 0.0 ); -* // returns TODO +* var v = snippet( 2.0 ); +* // returns 2.0 */ -function TODO() { - // TODO: implementation +function snippet( x ) { + return x; } // EXPORTS // -module.exports = TODO; +module.exports = snippet; diff --git a/tools/snippets/test/test.js b/tools/snippets/test/test.js index 5fc8f28d2b0c..596c55d75288 100644 --- a/tools/snippets/test/test.js +++ b/tools/snippets/test/test.js @@ -1,35 +1,19 @@ -/** -* @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 TODO = require( './../lib' ); +var snippet = require( './../lib' ); // TESTS // tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof TODO, 'function', 'main export is a function' ); + t.strictEqual( typeof snippet, 'function', 'exports a function' ); t.end(); }); -// TODO: add tests +tape( 'returns input value unchanged', function test( t ) { + t.strictEqual( snippet( 4.0 ), 4.0, 'returns same value' ); + t.end(); +}); From 5465f9cc5e40e0d3d270f6e920bb20c49f2e3f7c Mon Sep 17 00:00:00 2001 From: Mahi Date: Sun, 1 Feb 2026 12:41:12 +0530 Subject: [PATCH 2/5] docs: fix broken Schubert & Gertz DOI link --- .../@stdlib/stats/base/ndarray/variancech/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/base/ndarray/variancech/README.md b/lib/node_modules/@stdlib/stats/base/ndarray/variancech/README.md index d90560491b64..d767408e20f0 100644 --- a/lib/node_modules/@stdlib/stats/base/ndarray/variancech/README.md +++ b/lib/node_modules/@stdlib/stats/base/ndarray/variancech/README.md @@ -199,7 +199,7 @@ console.log( v ); [@chan:1983a]: https://doi.org/10.1080/00031305.1983.10483115 -[@schubert:2018a]: https://doi.org/10.1145/3221664.3221674 +[@schubert:2018a]: https://dl.acm.org/doi/10.1145/3221664.3221674 From f35505df3c990d7b5aa5cf345a43a6548edd0835 Mon Sep 17 00:00:00 2001 From: d-mahi14 Date: Mon, 2 Feb 2026 10:16:56 +0530 Subject: [PATCH 3/5] Revert unrelated TODO changes Signed-off-by: d-mahi14 --- tools/snippets/lib/index.js | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/tools/snippets/lib/index.js b/tools/snippets/lib/index.js index 83fc0b376ff7..5ec20be28792 100644 --- a/tools/snippets/lib/index.js +++ b/tools/snippets/lib/index.js @@ -1,22 +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'; /** -* Example snippet utility. +* TODO: description * -* @module @stdlib/tools/snippets +* @module @stdlib/ * * @example -* var snippet = require( '@stdlib/tools/snippets' ); +* var TODO = require( '@stdlib/' ); * -* var v = snippet( 3.0 ); -* // returns 3.0 +* var v = TODO( 0.0 ); +* // returns TODO */ // MODULES // -var snippet = require( './main.js' ); +var TODO = require( './main.js' ); // EXPORTS // -module.exports = snippet; +module.exports = TODO; From 7b4fe77b7951eec03984a066ee5b7ad88d41c90b Mon Sep 17 00:00:00 2001 From: d-mahi14 Date: Mon, 2 Feb 2026 10:17:52 +0530 Subject: [PATCH 4/5] Revert unrelated TODO changes Updated the main.js file to include a new TODO function and modified the snippet function documentation. Signed-off-by: d-mahi14 --- tools/snippets/lib/main.js | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/tools/snippets/lib/main.js b/tools/snippets/lib/main.js index 49d1ff3748aa..c9409542e1e4 100644 --- a/tools/snippets/lib/main.js +++ b/tools/snippets/lib/main.js @@ -1,25 +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'; // MAIN // /** -* Example snippet function which returns the input value unchanged. -* -* This function exists as a simple demonstration utility for tooling -* and documentation examples. +* TODO: description * -* @param {number} x - input value -* @returns {number} input value +* @param {} TODO - TODO: param desc +* @returns {} TODO: desc * * @example -* var v = snippet( 2.0 ); -* // returns 2.0 +* var v = TODO( 0.0 ); +* // returns TODO */ -function snippet( x ) { - return x; +function TODO() { + // TODO: implementation } // EXPORTS // -module.exports = snippet; +module.exports = TODO; From b264396b589c87697b50ec00058a801d99b7761c Mon Sep 17 00:00:00 2001 From: d-mahi14 Date: Mon, 2 Feb 2026 10:18:41 +0530 Subject: [PATCH 5/5] Revert unrelated TODO changes Signed-off-by: d-mahi14 --- tools/snippets/test/test.js | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/tools/snippets/test/test.js b/tools/snippets/test/test.js index 596c55d75288..5fc8f28d2b0c 100644 --- a/tools/snippets/test/test.js +++ b/tools/snippets/test/test.js @@ -1,19 +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. +*/ + 'use strict'; // MODULES // var tape = require( 'tape' ); -var snippet = require( './../lib' ); +var TODO = require( './../lib' ); // TESTS // tape( 'main export is a function', function test( t ) { - t.strictEqual( typeof snippet, 'function', 'exports a function' ); + t.ok( true, __filename ); + t.strictEqual( typeof TODO, 'function', 'main export is a function' ); t.end(); }); -tape( 'returns input value unchanged', function test( t ) { - t.strictEqual( snippet( 4.0 ), 4.0, 'returns same value' ); - t.end(); -}); +// TODO: add tests