Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update README examples to use const and let #3085

Open
wants to merge 89 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
7fd8570
chore: minor clean-up
Planeshifter Nov 1, 2024
c8d2005
docs: update README examples to use const and let
Planeshifter Nov 1, 2024
2ffde79
docs: update README examples to use const and let
Planeshifter Nov 2, 2024
1e7bfd5
docs: update README examples to use const and let
Planeshifter Nov 2, 2024
df36a09
docs: update README examples to use const and let
Planeshifter Nov 2, 2024
88101e3
docs: update README examples to use const and let
Planeshifter Nov 2, 2024
dc39ab0
docs: update README examples to use const and let
Planeshifter Nov 2, 2024
f8a0470
docs: update README examples to use const and let
Planeshifter Nov 2, 2024
f706221
docs: update README examples to use const and let
Planeshifter Nov 2, 2024
80bbd33
docs: update README examples to use const and let
Planeshifter Nov 2, 2024
089a190
docs: update README examples to use const and let
Planeshifter Nov 2, 2024
79c4b54
docs: update README examples to use const and let
Planeshifter Nov 2, 2024
c0ac0f7
docs: update README examples to use const and let
Planeshifter Nov 2, 2024
3aa06d0
docs: update README examples to use const and let
Planeshifter Nov 2, 2024
d8f2a2f
docs: update README examples to use const and let
Planeshifter Nov 2, 2024
7251329
docs: update README examples to use const and let
Planeshifter Nov 2, 2024
339f611
docs: update README examples to use const and let
Planeshifter Nov 2, 2024
749aa86
docs: update README examples to use const and let
Planeshifter Nov 2, 2024
1da43bc
docs: update README examples to use const and let
Planeshifter Nov 2, 2024
ba55900
docs: update README examples to use const and let
Planeshifter Nov 2, 2024
19e7e06
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
57a818f
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
45feb45
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
4a43d1f
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
0c3a68f
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
0b9d396
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
f854e5e
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
b7ecbd4
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
1c10789
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
aed424c
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
ae54989
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
d97d6c8
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
385fd3f
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
d122175
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
99507a3
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
277d9e4
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
20c3818
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
7aeb7f3
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
9ba87e5
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
2f81d5d
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
23b3313
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
805df14
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
9086f5d
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
2f1213c
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
6c0ca37
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
dddbce6
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
f73a850
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
8e2e571
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
170ac12
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
dc75ad1
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
306ad8d
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
ee10f26
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
25d2fb1
docs: update README examples to use const and let
Planeshifter Nov 3, 2024
72e1a36
docs: update README examples to use const and let
Planeshifter Nov 4, 2024
38d5580
docs: update README examples to use const and let
Planeshifter Nov 4, 2024
33d3421
docs: update README examples to use const and let
Planeshifter Nov 4, 2024
673278e
docs: update README examples to use const and let
Planeshifter Nov 4, 2024
6b3fe37
docs: update README examples to use const and let
Planeshifter Nov 4, 2024
185c8ef
docs: update README examples to use const and let
Planeshifter Nov 4, 2024
0a506a4
docs: update README examples to use const and let
Planeshifter Nov 4, 2024
1771ceb
docs: update README examples to use const and let
Planeshifter Nov 4, 2024
61f9ae0
docs: update README examples to use const and let
Planeshifter Nov 5, 2024
ef93fe2
docs: update README examples to use const and let
Planeshifter Nov 5, 2024
3d1f179
docs: update README examples to use const and let
Planeshifter Nov 5, 2024
490f8ea
docs: update README examples to use const and let
Planeshifter Nov 5, 2024
47dd1b3
docs: update README examples to use const and let
Planeshifter Nov 5, 2024
0d72dc0
build: add words to dictionary
Planeshifter Nov 5, 2024
c12e30e
docs: update README examples to use const and let
Planeshifter Nov 6, 2024
3a37639
docs: update README examples to use const and let
Planeshifter Nov 7, 2024
57df6d4
docs: update README examples to use const and let
Planeshifter Nov 7, 2024
422e561
docs: update README examples to use const and let
Planeshifter Nov 7, 2024
fd2aee6
docs: update README examples to use const and let
Planeshifter Nov 7, 2024
c8ef23d
docs: update README examples to use const and let
Planeshifter Nov 7, 2024
ddc1fab
docs: update README examples to use const and let
Planeshifter Nov 7, 2024
8d492d7
docs: update README examples to use const and let
Planeshifter Nov 7, 2024
875c1bd
docs: update README examples to use const and let
Planeshifter Nov 7, 2024
add9366
docs: update README examples to use const and let
Planeshifter Nov 8, 2024
ff5a8fe
docs: update README examples to use const and let
Planeshifter Nov 8, 2024
fca7ac6
docs: update README examples to use const and let
Planeshifter Nov 8, 2024
2f7f79c
docs: update README examples to use const and let
Planeshifter Nov 8, 2024
acba45b
docs: update README examples to use const and let
Planeshifter Nov 9, 2024
00be223
docs: update README examples to use const and let
Planeshifter Nov 9, 2024
c0dc7bb
docs: update README examples to use const and let
Planeshifter Nov 9, 2024
d4fa2ad
Merge branch 'develop' into philipp/update-readme-var-declarations
Planeshifter Nov 11, 2024
6036a47
Merge branch 'develop' into philipp/update-readme-var-declarations
Planeshifter Nov 11, 2024
6697ba4
chore: use const/let instead of var
Planeshifter Nov 11, 2024
6e8b5d6
Merge branch 'develop' into philipp/update-readme-var-declarations
Planeshifter Nov 15, 2024
6c54a9d
Merge branch 'develop' into philipp/update-readme-var-declarations
Planeshifter Nov 18, 2024
b362103
Merge branch 'develop' into philipp/update-readme-var-declarations
Planeshifter Nov 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 7 additions & 0 deletions etc/eslint/.eslintrc.markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

// MODULES //

// FIXME: remove the next line and uncomment the subsequent line once all remark JSDoc ESLint rules are completed

Check warning on line 23 in etc/eslint/.eslintrc.markdown.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'fixme' comment: 'FIXME: remove the next line and...'
var copy = require( './../../lib/node_modules/@stdlib/utils/copy' );

// Var copy = require( './utils/copy.js' );
Expand Down Expand Up @@ -123,7 +123,7 @@
*
* @private
*/
eslint.rules[ 'stdlib/jsdoc-return-annotations-values' ] = 'off'; // FIXME: remove this once we can reliably lint Markdown code blocks

Check warning on line 126 in etc/eslint/.eslintrc.markdown.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'fixme' comment: 'FIXME: remove this once we can reliably...'

/**
* Allow use of undeclared variables, as variables may be defined in previous code blocks or be implied.
Expand All @@ -146,6 +146,13 @@
*/
eslint.rules[ 'node/no-unpublished-require' ] = 'off';

/**
* Allow modern ECMAScript syntax.
*
* @private
*/
eslint.rules[ 'node/no-unsupported-features/es-syntax' ] = 'off';


// EXPORTS //

Expand Down
3 changes: 2 additions & 1 deletion etc/eslint/overrides/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ var overrides = [
'stdlib/return-annotations-values': 'off',
'strict': 'off',
'vars-on-top': 'off',
'node/no-unpublished-require': 'off'
'node/no-unpublished-require': 'off',
'node/no-unsupported-features/es-syntax': 'off'
}
},
{
Expand Down
8 changes: 8 additions & 0 deletions etc/eslint/rules/spellcheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,21 @@ rules[ '@cspell/spellchecker' ] = [ 'warn', {
'exponentiated',
'evalpoly',
'evalrational',
'gmean',
'hmean',
'hommel',
'iget',
'indegree',
'indegrees',
'iset',
'isnan',
'logcdf',
'logit',
'logpdf',
'logpmf',
'lpad',
'ltrim',
'memberof',
'napi',
'nargs',
'ncols',
Expand All @@ -102,12 +108,14 @@ rules[ '@cspell/spellchecker' ] = [ 'warn', {
'ndarrays',
'nrows',
'nsubmodes',
'numel',
'pvalues',
'randn',
'randu',
'rpad',
'rtrim',
'significand',
'significands',
'stdev',
'strided',
'stringifying',
Expand Down
38 changes: 19 additions & 19 deletions lib/node_modules/@stdlib/_tools/benchmarks/browser-build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ limitations under the License.
## Usage

```javascript
var build = require( '@stdlib/_tools/benchmarks/browser-build' );
const build = require( '@stdlib/_tools/benchmarks/browser-build' );
```

#### build( root, output, \[options,] clbk )
Expand All @@ -47,10 +47,10 @@ Given a `root` directory from which to search for benchmarks and an output direc
<!-- eslint-disable stdlib/no-redeclare -->

```javascript
var cwd = require( '@stdlib/process/cwd' );
const cwd = require( '@stdlib/process/cwd' );

var root = cwd();
var out = root;
const root = cwd();
const out = root;

build( root, out, clbk );

Expand Down Expand Up @@ -79,12 +79,12 @@ To provide an alternative glob pattern, set the `pattern` option.
<!-- eslint-disable stdlib/no-redeclare -->

```javascript
var cwd = require( '@stdlib/process/cwd' );
const cwd = require( '@stdlib/process/cwd' );

var root = cwd();
var out = root;
const root = cwd();
const out = root;

var opts = {
const opts = {
'pattern': '**/bench.js'
};

Expand All @@ -107,12 +107,12 @@ To mount a bundle on a URL path, set the `mount`option.
<!-- eslint-disable stdlib/no-redeclare -->

```javascript
var cwd = require( '@stdlib/process/cwd' );
const cwd = require( '@stdlib/process/cwd' );

var root = cwd();
var out = root;
const root = cwd();
const out = root;

var opts = {
const opts = {
'mount': '/www/public/'
};

Expand Down Expand Up @@ -153,17 +153,17 @@ function clbk( error, bool ) {
<!-- eslint no-undef: "error" -->

```javascript
var join = require( 'path' ).join;
var resolve = require( 'path' ).resolve;
var mkdirp = require( 'mkdirp' ).sync;
var build = require( '@stdlib/_tools/benchmarks/browser-build' );
const join = require( 'path' ).join;
const resolve = require( 'path' ).resolve;
const mkdirp = require( 'mkdirp' ).sync;
const build = require( '@stdlib/_tools/benchmarks/browser-build' );

var root = join( __dirname, 'fixtures' );
var out = resolve( __dirname, '../build' );
const root = join( __dirname, 'fixtures' );
const out = resolve( __dirname, '../build' );

mkdirp( out );

var opts = {
const opts = {
'pattern': 'index.js',
'bundle': 'benchmark_bundle.js',
'html': 'benchmarks.html'
Expand Down
20 changes: 10 additions & 10 deletions lib/node_modules/@stdlib/_tools/benchmarks/bundle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ limitations under the License.
## Usage

```javascript
var bundle = require( '@stdlib/_tools/benchmarks/bundle' );
const bundle = require( '@stdlib/_tools/benchmarks/bundle' );
```

#### bundle( root, \[options,] clbk )

Given a `root` directory from which to search for benchmarks, bundle benchmarks into a single file using [browserify][browserify].

```javascript
var cwd = require( '@stdlib/process/cwd' );
const cwd = require( '@stdlib/process/cwd' );

bundle( cwd(), clbk );

Expand All @@ -65,9 +65,9 @@ The function accepts the following `options`:
To specify an output file path, set the `out` option.

```javascript
var cwd = require( '@stdlib/process/cwd' );
const cwd = require( '@stdlib/process/cwd' );

var opts = {
const opts = {
'out': '/foo/bar/bundle.js'
};

Expand All @@ -88,9 +88,9 @@ function clbk( error, bool ) {
To provide an alternative glob pattern, set the `pattern` option.

```javascript
var cwd = require( '@stdlib/process/cwd' );
const cwd = require( '@stdlib/process/cwd' );

var opts = {
const opts = {
'pattern': '**/bench.js'
};

Expand Down Expand Up @@ -127,12 +127,12 @@ function clbk( error, bundle ) {
<!-- eslint no-undef: "error" -->

```javascript
var join = require( 'path' ).join;
var bundle = require( '@stdlib/_tools/benchmarks/bundle' );
const join = require( 'path' ).join;
const bundle = require( '@stdlib/_tools/benchmarks/bundle' );

var root = join( __dirname, 'fixtures' );
const root = join( __dirname, 'fixtures' );

var opts = {
const opts = {
'pattern': '*.js'
};

Expand Down
10 changes: 5 additions & 5 deletions lib/node_modules/@stdlib/_tools/benchmarks/html/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ limitations under the License.
## Usage

```javascript
var build = require( '@stdlib/_tools/benchmarks/html' );
const build = require( '@stdlib/_tools/benchmarks/html' );
```

#### build( bundle, \[options,] clbk )

Given a `bundle` URL from which to load a benchmarks bundle, returns an HTML file for running benchmarks.

```javascript
var bundle = '/foo/bar/bundle.js';
const bundle = '/foo/bar/bundle.js';

build( bundle, clbk );

Expand All @@ -65,9 +65,9 @@ The function accepts the following `options`:
To specify an output file path, set the `out` option.

```javascript
var bundle = '/foo/bar/bundle.js';
const bundle = '/foo/bar/bundle.js';

var opts = {
const opts = {
'out': '/foo/bar/benchmarks.html'
};

Expand Down Expand Up @@ -101,7 +101,7 @@ function clbk( error ) {
<!-- eslint no-undef: "error" -->

```javascript
var build = require( '@stdlib/_tools/benchmarks/html' );
const build = require( '@stdlib/_tools/benchmarks/html' );

build( '/foo/bar/bundle.js', onBuild );

Expand Down
12 changes: 6 additions & 6 deletions lib/node_modules/@stdlib/_tools/bib/citation-reference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ limitations under the License.
## Usage

```javascript
var toReference = require( '@stdlib/_tools/bib/citation-reference' );
const toReference = require( '@stdlib/_tools/bib/citation-reference' );
```

<a name="to-reference"></a>
Expand Down Expand Up @@ -65,7 +65,7 @@ To use a specific bibliographic database, set the `database` option.
<!-- run-disable -->

```javascript
var opts = {
const opts = {
'database': '/foo/bar/baz/bib.bib'
};

Expand All @@ -84,7 +84,7 @@ To use a particular [Citation Style Language][csl] (CSL), set the `csl` option.
<!-- run-disable -->

```javascript
var opts = {
const opts = {
'csl': '/foo/bar/baz/style.csl'
};

Expand All @@ -105,7 +105,7 @@ Synchronously returns a reference corresponding to a citation identifier.
<!-- run-disable -->

```javascript
var ref = toReference.sync( '@press:1992' );
const ref = toReference.sync( '@press:1992' );
// returns '...'
```

Expand Down Expand Up @@ -139,7 +139,7 @@ The method accepts the same `options` as [`toReference()`](#to-reference) above.
<!-- eslint no-undef: "error" -->

```javascript
var toReference = require( '@stdlib/_tools/bib/citation-reference' );
const toReference = require( '@stdlib/_tools/bib/citation-reference' );

/* bib.bib
@book{press:1992,
Expand All @@ -152,7 +152,7 @@ var toReference = require( '@stdlib/_tools/bib/citation-reference' );
}
*/

var opts = {
const opts = {
'database': 'bib.bib',
'csl': 'chicago-author-date.csl'
};
Expand Down
14 changes: 7 additions & 7 deletions lib/node_modules/@stdlib/_tools/browserify/file-list/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ limitations under the License.
## Usage

```javascript
var bundle = require( '@stdlib/_tools/browserify/file-list' );
const bundle = require( '@stdlib/_tools/browserify/file-list' );
```

#### bundle( files, \[dest,] clbk )

Bundles files into a single file using [browserify][browserify].

```javascript
var files = [
const files = [
'/foo/bar.js',
'/beep/boop.js'
];
Expand All @@ -63,7 +63,7 @@ function clbk( error, bundle ) {
To specify an output file path, provide a `dest` argument.

```javascript
var files = [
const files = [
'/foo/bar.js',
'/beep/boop.js'
];
Expand Down Expand Up @@ -102,11 +102,11 @@ function clbk( error ) {
<!-- eslint no-undef: "error" -->

```javascript
var join = require( 'path' ).join;
var bundle = require( '@stdlib/_tools/browserify/file-list' );
const join = require( 'path' ).join;
const bundle = require( '@stdlib/_tools/browserify/file-list' );

var fpath = join( __dirname, 'examples', 'fixtures', 'index.js' );
var files = [ fpath ];
const fpath = join( __dirname, 'examples', 'fixtures', 'index.js' );
const files = [ fpath ];

bundle( files, onBundle );

Expand Down
12 changes: 6 additions & 6 deletions lib/node_modules/@stdlib/_tools/browserify/string/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ limitations under the License.
## Usage

```javascript
var bundle = require( '@stdlib/_tools/browserify/string' );
const bundle = require( '@stdlib/_tools/browserify/string' );
```

#### bundle( str, \[dest,] \[options,] clbk )

Generates a bundle from a `string` using [browserify][browserify].

```javascript
var str = 'module.exports = require( "url" );';
const str = 'module.exports = require( "url" );';

bundle( str, clbk );

Expand All @@ -60,7 +60,7 @@ function clbk( error, bundle ) {
To specify an output file path, provide a `dest` argument.

```javascript
var str = 'module.exports = require( "url" );';
const str = 'module.exports = require( "url" );';

bundle( str, './bundle.js', clbk );

Expand Down Expand Up @@ -106,11 +106,11 @@ The function accepts any [browserify][browserify] `option`, as well as the follo
<!-- eslint no-undef: "error" -->

```javascript
var bundle = require( '@stdlib/_tools/browserify/string' );
const bundle = require( '@stdlib/_tools/browserify/string' );

var str = 'module.exports = require( "path" ).join;';
const str = 'module.exports = require( "path" ).join;';

var opts = {
const opts = {
'exportName': 'beep'
};

Expand Down
Loading
Loading