File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- /**
2- * @license Apache-2.0
3- *
4- * Copyright (c) 2026 The Stdlib Authors.
5- *
6- * Licensed under the Apache License, Version 2.0 (the "License");
7- * you may not use this file except in compliance with the License.
8- * You may obtain a copy of the License at
9- *
10- * http://www.apache.org/licenses/LICENSE-2.0
11- *
12- * Unless required by applicable law or agreed to in writing, software
13- * distributed under the License is distributed on an "AS IS" BASIS,
14- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15- * See the License for the specific language governing permissions and
16- * limitations under the License.
17- */
18-
191'use strict' ;
202
213/**
22- * TODO: description
4+ * Example snippet utility.
235*
24- * @module @stdlib /<TODO: module path>
6+ * @module @stdlib /tools/snippets
257*
268* @example
27- * var TODO = require( '@stdlib/<TODO: module path> ' );
9+ * var snippet = require( '@stdlib/tools/snippets ' );
2810*
29- * var v = TODO( 0 .0 );
30- * // returns TODO
11+ * var v = snippet( 3 .0 );
12+ * // returns 3.0
3113*/
3214
3315// MODULES //
3416
35- var TODO = require ( './main.js' ) ;
17+ var snippet = require ( './main.js' ) ;
3618
3719
3820// EXPORTS //
3921
40- module . exports = TODO ;
22+ module . exports = snippet ;
Original file line number Diff line number Diff line change 1- /**
2- * @license Apache-2.0
3- *
4- * Copyright (c) 2026 The Stdlib Authors.
5- *
6- * Licensed under the Apache License, Version 2.0 (the "License");
7- * you may not use this file except in compliance with the License.
8- * You may obtain a copy of the License at
9- *
10- * http://www.apache.org/licenses/LICENSE-2.0
11- *
12- * Unless required by applicable law or agreed to in writing, software
13- * distributed under the License is distributed on an "AS IS" BASIS,
14- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15- * See the License for the specific language governing permissions and
16- * limitations under the License.
17- */
18-
191'use strict' ;
202
213// MAIN //
224
235/**
24- * TODO: description
6+ * Example snippet function which returns the input value unchanged.
7+ *
8+ * This function exists as a simple demonstration utility for tooling
9+ * and documentation examples.
2510*
26- * @param {<TODO: type> } TODO - TODO: param desc
27- * @returns {<TODO: type> } TODO: desc
11+ * @param {number } x - input value
12+ * @returns {number } input value
2813*
2914* @example
30- * var v = TODO( 0 .0 );
31- * // returns TODO
15+ * var v = snippet( 2 .0 );
16+ * // returns 2.0
3217*/
33- function TODO ( ) {
34- // TODO: implementation
18+ function snippet ( x ) {
19+ return x ;
3520}
3621
3722
3823// EXPORTS //
3924
40- module . exports = TODO ;
25+ module . exports = snippet ;
Original file line number Diff line number Diff line change 1- /**
2- * @license Apache-2.0
3- *
4- * Copyright (c) 2026 The Stdlib Authors.
5- *
6- * Licensed under the Apache License, Version 2.0 (the "License");
7- * you may not use this file except in compliance with the License.
8- * You may obtain a copy of the License at
9- *
10- * http://www.apache.org/licenses/LICENSE-2.0
11- *
12- * Unless required by applicable law or agreed to in writing, software
13- * distributed under the License is distributed on an "AS IS" BASIS,
14- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15- * See the License for the specific language governing permissions and
16- * limitations under the License.
17- */
18-
191'use strict' ;
202
213// MODULES //
224
235var tape = require ( 'tape' ) ;
24- var TODO = require ( './../lib' ) ;
6+ var snippet = require ( './../lib' ) ;
257
268
279// TESTS //
2810
2911tape ( 'main export is a function' , function test ( t ) {
30- t . ok ( true , __filename ) ;
31- t . strictEqual ( typeof TODO , 'function' , 'main export is a function' ) ;
12+ t . strictEqual ( typeof snippet , 'function' , 'exports a function' ) ;
3213 t . end ( ) ;
3314} ) ;
3415
35- // TODO: add tests
16+ tape ( 'returns input value unchanged' , function test ( t ) {
17+ t . strictEqual ( snippet ( 4.0 ) , 4.0 , 'returns same value' ) ;
18+ t . end ( ) ;
19+ } ) ;
You can’t perform that action at this time.
0 commit comments