Skip to content

Commit 94c565c

Browse files
committed
Document commands
1 parent 0f75bf0 commit 94c565c

File tree

1 file changed

+59
-10
lines changed

1 file changed

+59
-10
lines changed

lib/node_modules/@stdlib/repl/README.md

Lines changed: 59 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,14 @@ In [2]: x
373373
Out[2]: 3.14
374374
```
375375

376+
#### citation()
377+
378+
Prints how to cite stdlib in publications.
379+
380+
```text
381+
In [1]: citation()
382+
```
383+
376384
#### clear()
377385

378386
Clears the entire REPL screen and scrollback history.
@@ -483,6 +491,30 @@ The function supports the following `options`:
483491
In [1]: clearWorkspace( 'foobar', { 'include': /^x/ } );
484492
```
485493

494+
#### contributors()
495+
496+
Prints a list of stdlib contributors.
497+
498+
```text
499+
In [1]: contributors()
500+
```
501+
502+
#### copyright()
503+
504+
Prints copyright information.
505+
506+
```text
507+
In [1]: copyright()
508+
```
509+
510+
#### credits()
511+
512+
Prints credits.
513+
514+
```text
515+
In [1]: credits()
516+
```
517+
486518
#### currentWorkspace
487519

488520
Returns the name of the current workspace.
@@ -492,6 +524,21 @@ In [1]: currentWorkspace
492524
Out[1]: 'base'
493525
```
494526

527+
#### deeprerequire( id )
528+
529+
Re-imports a module, JSON, or local file and all of its associated module dependencies.
530+
531+
```text
532+
In [1]: var foo = require( './foo.js' );
533+
534+
// Modify `./foo.js` and/or its module dependencies...
535+
536+
// Re-import the module:
537+
In [2]: foo = deeprerequire( './foo.js' );
538+
```
539+
540+
Modules can be imported from `node_modules`. Local modules and JSON files can be imported using a relative path (e.g., `'./foo.js'`, `'./../bar.json'`, etc) that will be resolved against the current working directory.
541+
495542
#### deleteWorkspace( \[name] )
496543

497544
Deletes a workspace.
@@ -531,21 +578,14 @@ Out[5]: 'base'
531578

532579
**Note**: the `'base'` workspace **cannot** be deleted.
533580

534-
#### deeprerequire( id )
581+
#### donate()
535582

536-
Re-imports a module, JSON, or local file and all of its associated module dependencies.
583+
Prints donation information.
537584

538585
```text
539-
In [1]: var foo = require( './foo.js' );
540-
541-
// Modify `./foo.js` and/or its module dependencies...
542-
543-
// Re-import the module:
544-
In [2]: foo = deeprerequire( './foo.js' );
586+
In [1]: donate()
545587
```
546588

547-
Modules can be imported from `node_modules`. Local modules and JSON files can be imported using a relative path (e.g., `'./foo.js'`, `'./../bar.json'`, etc) that will be resolved against the current working directory.
548-
549589
#### evalin( workspace, expression )
550590

551591
Evaluates an `expression` in a specified `workspace`.
@@ -635,6 +675,14 @@ In [1]: isKeyword( 'base.sin' )
635675
Out[1]: true
636676
```
637677

678+
#### license()
679+
680+
Prints license information.
681+
682+
```text
683+
In [1]: license()
684+
```
685+
638686
#### load( fpath )
639687

640688
Loads and evaluates a JavaScript file, such as a REPL history file, line-by-line.
@@ -725,6 +773,7 @@ The function accepts the following `options`:
725773
- **load**: file path specifying a [presentation][@stdlib/repl/presentation] file to load. If presentation `text` is provided, this option is **ignored**. Otherwise, this option is **required**.
726774
- **watch**: `boolean` indicating whether to watch a [presentation][@stdlib/repl/presentation] source file for changes. This option is only applicable if not provided presentation `text` and the `options` object specifies a presentation file to load. Default: `false`.
727775
- **autoClear**: `boolean` indicating whether to automatically clear the screen before writing a rendered slide to the REPL. Default: `true`.
776+
- **loop**: `boolean` indicating whether to "loop" a presentation. Default: `false`.
728777

729778
A few notes:
730779

0 commit comments

Comments
 (0)