Skip to content

Commit 73ae7d7

Browse files
committed
docs: update outdated copy
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent a650986 commit 73ae7d7

File tree

1 file changed

+141
-36
lines changed

1 file changed

+141
-36
lines changed

etc/typedoc/index.md

Lines changed: 141 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,21 @@ limitations under the License.
4242

4343
<section class="intro">
4444

45-
stdlib ([/ˈstændərd lɪb/][ipa-english] "standard lib") is a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing applications. The library provides a collection of robust, high performance libraries for mathematics, statistics, data processing, streams, and more and includes many of the utilities you would expect from a standard library.
4645

47-
This is the TypeScript documentation for exported functions, methods, properties, classes, and variables. For help developing stdlib, see the [development guide][stdlib-development].
46+
47+
We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib.
48+
49+
stdlib ([/ˈstændərd lɪb/][ipa-english] "standard lib") is a standard library with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js. The library provides a collection of robust, high performance libraries for mathematics, statistics, data processing, streams, and more and includes many of the utilities you would expect from a standard library.
50+
51+
What sets stdlib apart is its fully decomposable architecture, which allows you to swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.
52+
53+
When you use stdlib, you can be confident that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code available.
54+
55+
Want to join us in bringing numerical computing to the web? **Start by starring the project.** :star2:
56+
57+
Explore this GitHub repository for stdlib's source code and documentation. For guidance on developing stdlib, refer to the [development guide][stdlib-development].
58+
59+
Thank you for being a part of our community! Your support is invaluable to us!
4860

4961
## Resources
5062

@@ -57,8 +69,10 @@ This is the TypeScript documentation for exported functions, methods, properties
5769

5870
### External Resources
5971

60-
- [**Twitter**][stdlib-twitter]
61-
- [**Gitter**][stdlib-gitter]
72+
- [**Google Calendar**][stdlib-public-calendar]: calendar of public events, including [open office hours][stdlib-office-hours].
73+
- [**Open Collective**][open-collective-stdlib]: financially support the project.
74+
- [**Bluesky**][stdlib-bluesky]: follow us on social media.
75+
- [**Gitter**][stdlib-gitter]: chat with project maintainers and other community members.
6276

6377
## Features
6478

@@ -128,17 +142,23 @@ This is the TypeScript documentation for exported functions, methods, properties
128142
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@e54894a93697653dda22d11cd0aec1ccb292b7b8/docs/assets/readme/bundled.png" alt="Demo showcasing browser support">
129143
</div>
130144

145+
- Every function is accompanied by [TypeScript][typescript] declaration files, ensuring type safety and facilitating intelligent code completion in IDEs.
146+
147+
<div class="image" align="center">
148+
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@f5f1f915a7178d9bc76a95d34afd799e6092ec3a/docs/assets/readme/typescript.png" alt="Demo showcasing TypeScript declaration files" >
149+
</div>
150+
131151
* * *
132152

133153
## Installation
134154

135-
To accommodate various use cases, stdlib can be consumed in multiple ways. The preferred means of consumption depends on your individual use case. We've provided some user stories to help you identify the best approach. 😃
155+
To accommodate various use cases, stdlib can be used in multiple ways. The preferred method of use depends on your individual use case. We've provided some user stories to help you identify the best approach. 😃
136156

137-
While this project's installation instructions defaults to using [npm][npm] for package management, installation via other package managers, such as [yarn][yarn], should be a matter of simply swapping out [npm][npm] commands with those of the relevant package manager.
157+
While this project's installation instructions default to using [npm][npm] for package management, installation via other package managers, such as [yarn][yarn], should be a matter of simply swapping out [npm][npm] commands with those of the relevant package manager.
138158

139159
### User Stories
140160

141-
- I want to perform **data analysis** and/or **data science** related tasks in JavaScript and Node.js, similar to how I might use IPython, Julia, R, and/or MATLAB.
161+
- I want to perform **data analysis** and **data science** tasks in JavaScript and Node.js, similar to how I might use Python, Julia, R, and MATLAB.
142162

143163
- Install the entire project as a [command-line utility](#install_command_line_utility).
144164

@@ -154,31 +174,41 @@ While this project's installation instructions defaults to using [npm][npm] for
154174

155175
- I would like to include stdlib functionality by just using a `script` tag.
156176

157-
- Install one of the pre-built UMD [browser bundles](#install_browser_bundles) or consume one of the pre-built bundles via a CDN, such as [unpkg][unpkg].
177+
- I would like to use ES Modules.
178+
179+
- Use an individual package's ES Module [build](#install_env_builds_esm).
180+
181+
- I would like to use a pre-built bundle (possibly via a CDN, such as [unpkg][unpkg] or [jsDelivr][jsdelivr]).
182+
183+
- Install (or consume via a CDN) an individual package's pre-built UMD [browser bundle](#install_env_builds_umd).
158184

159185
- I am interested in using a substantial amount of functionality found in a top-level stdlib namespace and don't want to separately install hundreds of individual packages (e.g., if building an on-line calculator application and wanting all of stdlib's math functionality).
160186

161187
- Install one or more top-level [namespaces](#install_namespaces). Installing the entire project is likely unnecessary and will lead to slower installation times. Installing a top-level namespace is likely to mean installing functionality which will never be used; however, installing a top-level namespace is likely to be easier and less time-consuming than installing many individual packages separately.
162188

163-
Concerning bundling, installing a top-level namespace should not be a concern, as individual functionality can still be independently required/imported. Project installation times may, however, be somewhat slower.
189+
When bundling, installing a top-level namespace should not be a concern, as individual functionality can still be independently required/imported. Project installation times may, however, be somewhat slower.
164190

165191
- I am building a [Node.js][node-js] **server application**.
166192

167193
- I am interested in using various functionality found in stdlib.
168194

169195
- Install [individual packages](#install_individual_packages). Installing the entire project is likely unnecessary and will lead to slower installation times.
170196

171-
- I am interested in using a substantial amount of functionality found in a top-level stdlib namespace and don't want to separately install hundreds of individual packages.
197+
- I would like to **vendor** stdlib functionality and avoid dependency trees.
198+
199+
- Install individual package UMD [bundles](#install_env_builds_nodejs).
200+
201+
- I am interested in using a _substantial_ amount of functionality found in a top-level stdlib namespace and don't want to separately install hundreds of individual packages.
172202

173203
- Install one or more top-level [namespaces](#install_namespaces). Installing the entire project is likely unnecessary and will lead to slower installation times. Installing a top-level namespace is likely to mean installing functionality which will never be used; however, installing a top-level namespace is likely to be easier and less time-consuming than installing many individual packages separately.
174204

175205
- I am using **Deno**.
176206

177-
- Use [skypack][skypack] to import [individual packages](#install_individual_packages).
207+
- Import [individual packages](#install_env_builds_deno) using pre-built Deno builds.
178208

179209
- I would like to use stdlib functionality in an [Observable][observable] notebook.
180210

181-
- Consume one of the pre-built [browser bundles](#install_browser_bundles) via a CDN, such as [unpkg][unpkg].
211+
- Consume a pre-built [browser bundles](#install_env_builds_umd) via a CDN, such as [unpkg][unpkg] or [jsDelivr][jsdelivr].
182212

183213
- I want to hack at stdlib, possibly even creating **customized** builds to link to platform-specific native libraries (such as Intel's MKL or some other numerical library).
184214

@@ -199,7 +229,7 @@ $ npm install @stdlib/stdlib
199229
Once installed, stdlib packages can be individually required/imported to minimize load times and decrease bundle sizes. For example, to use `require`
200230

201231
```javascript
202-
var ndarray = require( '@stdlib/ndarray/ctor' );
232+
var ndarray = require( '@stdlib/ndarray/array' );
203233

204234
var arr = ndarray( [ [ 1, 2 ], [ 3, 4 ] ] );
205235
// returns <ndarray>
@@ -210,7 +240,7 @@ and to use `import`
210240
<!-- run-disable -->
211241

212242
```javascript
213-
import ndarray from '@stdlib/ndarray/ctor';
243+
import ndarray from '@stdlib/ndarray/array';
214244

215245
var arr = ndarray( [ [ 1, 2 ], [ 3, 4 ] ] );
216246
// returns <ndarray>
@@ -227,13 +257,13 @@ To install individual packages, replace forward slashes `/` after `@stdlib/` wit
227257
<!-- run-disable -->
228258

229259
```bash
230-
$ npm install @stdlib/ndarray-ctor
260+
$ npm install @stdlib/ndarray-array
231261
```
232262

233263
Once installed, individual packages can be required/imported. For example, to use `require`
234264

235265
```javascript
236-
var ndarray = require( '@stdlib/ndarray-ctor' );
266+
var ndarray = require( '@stdlib/ndarray-array' );
237267

238268
var arr = ndarray( [ [ 1, 2 ], [ 3, 4 ] ] );
239269
// returns <ndarray>
@@ -244,7 +274,7 @@ and to use `import`
244274
<!-- run-disable -->
245275

246276
```javascript
247-
import ndarray from '@stdlib/ndarray-ctor';
277+
import ndarray from '@stdlib/ndarray-array';
248278

249279
var arr = ndarray( [ [ 1, 2 ], [ 3, 4 ] ] );
250280
// returns <ndarray>
@@ -312,37 +342,95 @@ and to run the [REPL][@stdlib/repl]
312342
$ stdlib repl
313343
```
314344

315-
<a name="install_browser_bundles"></a>
345+
<a name="install_env_builds"></a>
316346

317-
### Browser Bundles
347+
### Environment Builds
318348

319-
For pre-built distributable UMD bundles for use in browser environments or as shared ("vendored") libraries in server environments, see the [`dist`][stdlib-bundles] directory and associated [guide][stdlib-bundles].
349+
<a name="install_env_builds_esm"></a>
320350

321-
As an example, to include a UMD bundle exposing lower-level special [math functions][@stdlib/math/base/special] in a webpage, we can first locally install the UMD bundle package using [npm][npm]
351+
#### ES Modules
322352

323-
```bash
324-
$ npm install @stdlib/dist-math-base-special-flat
325-
```
353+
To use ES Modules via a `<script>` tag, use **ES Module builds** available in each package's repository via a dedicated `esm` branch (e.g., see the [`esm`][@stdlib/math-base-special-erf-esm] branch for [`@stdlib/math-base-special-erf`][@stdlib/math-base-special-erf-esm]). For example,
326354

327-
and then include the following `<script>` tag in our HTML document
355+
<!-- run-disable -->
328356

329357
```html
330-
<script type="text/javascript" src="/path/to/@stdlib/dist-math-base-special-flat/build/bundle.min.js"></script>
358+
<script type="module">
359+
import linspace from 'https://cdn.jsdelivr.net/gh/stdlib-js/array-base-linspace@esm/index.mjs';
360+
import erf from 'https://cdn.jsdelivr.net/gh/stdlib-js/math-base-special-erf@esm/index.mjs';
361+
362+
const x = linspace( -10.0, 10.0, 100 );
363+
364+
for ( let i = 0; i < x.length; i++ ) {
365+
console.log( 'x: %d, erf(x): %d', x[ i ], erf( x[ i ] ) );
366+
}
367+
</script>
331368
```
332369

333-
making sure to modify the script path based on the local installation directory.
370+
<a name="install_env_builds_deno"></a>
371+
372+
#### Deno
373+
374+
To use individual packages in Deno, use **Deno builds** available in each package's repository via a dedicated `deno` branch (e.g., see the [`deno`][@stdlib/ndarray-array-deno] branch for [`@stdlib/ndarray-array`][@stdlib/ndarray-array-deno]). For example,
375+
376+
<!-- run-disable -->
377+
378+
```javascript
379+
import ndarray from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-array@deno/mod.js';
380+
381+
var arr = ndarray( [ [ 1, 2 ], [ 3, 4 ] ] );
382+
// returns <ndarray>
383+
````
334384

335-
If no recognized module system is present, one can access bundle contents in another `<script>` tag via the global scope.
385+
386+
<a name="install_env_builds_jquery"></a>
387+
388+
#### jQuery-like Bundle
389+
390+
For those wanting a jQuery-like bundle, one can use pre-built distributable UMD bundles for use in browser environments or as shared ("vendored") libraries in server environments available in each package's repository via a dedicated `umd` branch. See sections [UMD](#install_env_builds_umd) and [Node.js](#install_env_builds_nodejs) for more details.
391+
392+
<a name="install_env_builds_umd"></a>
393+
394+
#### UMD
395+
396+
To use UMD bundles either via a `<script>` tag or in [Observable][observable], use UMD **browser builds** available in each package's repository via a dedicated `umd` branch (e.g., see the [`umd`][@stdlib/math-base-special-erf-umd] branch for [`@stdlib/math-base-special-erf`][@stdlib/math-base-special-erf-umd]). For example,
397+
398+
<!-- run-disable -->
336399

337400
```html
401+
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/stdlib-js/array-base-linspace@umd/browser.js"></script>
402+
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/stdlib-js/math-base-special-erf@umd/browser.js"></script>
338403
<script type="text/javascript">
339-
// If no recognized module system present, exposed to global scope:
340-
var erf = stdlib_math_base_special_flat.erf;
341-
console.log( erf( 0.5 ) );
404+
(function () {
405+
406+
var x = linspace( -10.0, 10.0, 100 );
407+
408+
for ( var i = 0; i < x.length; i++ ) {
409+
console.log( 'x: %d, erf(x): %d', x[ i ], erf( x[ i ] ) );
410+
}
411+
412+
})();
342413
</script>
343414
```
344415

345-
For more details and available bundles, see the [`dist`][stdlib-bundles] directory and associated [guide][stdlib-bundles]. The [guide][stdlib-bundles] includes instructions for consuming via CDNs, such as [unpkg][unpkg].
416+
<a name="install_env_builds_nodejs"></a>
417+
418+
#### Node.js
419+
420+
To **vendor** stdlib functionality and avoid installing dependency trees, use UMD **server builds** available in each package's repository via a dedicated `umd` branch (e.g., see the [`umd`][@stdlib/math-base-special-erf-umd] branch for [`@stdlib/math-base-special-erf`][@stdlib/math-base-special-erf-umd]). For example,
421+
422+
<!-- run-disable -->
423+
424+
```javascript
425+
var linspace = require( '/path/to/vendor/umd/@stdlib/array-base-linspace' );
426+
var erf = require( '/path/to/vendor/umd/@stdlib/math-base-special-erf' );
427+
428+
var x = linspace( -10.0, 10.0, 100 );
429+
430+
for ( var i = 0; i < x.length; i++ ) {
431+
console.log( 'x: %d, erf(x): %d', x[ i ], erf( x[ i ] ) );
432+
}
433+
```
346434
347435
<a name="install_custom_bundles"></a>
348436
@@ -359,24 +447,29 @@ To create a custom bundle based on project needs,
359447
<!-- run-disable -->
360448
361449
```bash
362-
$ node ./bin/cli bundle-pkg-list -- -h
450+
$ NODE_PATH=./lib/node_modules node ./bin/cli bundle-pkg-list -- -h
363451
```
364452
365453
4. modify and run the above command with the list of packages to bundle
366454
367455
<!-- run-disable -->
368456
369457
```bash
370-
$ node ./bin/cli bundle-pkg-list -- <pkg> <pkg> <pkg> ...
458+
$ NODE_PATH=./lib/node_modules node ./bin/cli bundle-pkg-list -- <pkg> <pkg> <pkg> ...
371459
```
372460
461+
<!-- FIXME: the following is not possible atm as we don't publish `@stdlib/_tools` which is needed in order for the command-line utility to work!
462+
373463
Alternatively, install stdlib as a command-line utility (as described above) and run the following command
464+
-->
374465

375466
<!-- run-disable -->
376467

468+
<!--
377469
```bash
378470
$ stdlib bundle-pkg-list -- <pkg> <pkg> <pkg> ...
379471
```
472+
-->
380473

381474
Upon generating a bundle, the bundle can be loaded via a `<script>` tag as described above for pre-built distributable UMD bundles.
382475

@@ -423,7 +516,7 @@ See [LICENSE][stdlib-license].
423516

424517
## Copyright
425518

426-
Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors].
519+
Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors].
427520

428521
</section>
429522

@@ -469,6 +562,10 @@ Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors].
469562

470563
[unpkg]: https://unpkg.com/#/
471564

565+
[jsdelivr]: https://www.jsdelivr.com/
566+
567+
[observable]: https://observablehq.com/
568+
472569
[ipa-english]: https://en.wikipedia.org/wiki/Help:IPA/English
473570

474571
[stdlib-contributing]: https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md
@@ -491,7 +588,9 @@ Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors].
491588

492589
[stdlib-code-coverage]: https://codecov.io/github/stdlib-js/stdlib/branch/develop
493590

494-
[stdlib-twitter]: https://x.com/stdlibjs
591+
<!-- [stdlib-twitter]: https://x.com/stdlibjs -->
592+
593+
[stdlib-bluesky]: https://bsky.app/profile/stdlib.io
495594

496595
[stdlib-gitter]: https://gitter.im/stdlib-js/stdlib
497596

@@ -513,6 +612,12 @@ Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors].
513612

514613
[@stdlib/repl]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/repl
515614

615+
[@stdlib/ndarray-array-deno]: https://github.com/stdlib-js/ndarray-array/tree/deno
616+
617+
[@stdlib/math-base-special-erf-esm]: https://github.com/stdlib-js/math-base-special-erf/tree/esm
618+
619+
[@stdlib/math-base-special-erf-umd]: https://github.com/stdlib-js/math-base-special-erf/tree/umd
620+
516621
</section>
517622

518623
<!-- /.links -->

0 commit comments

Comments
 (0)