Skip to content

Commit 3c9a690

Browse files
committed
Update namespace
1 parent e8ccfad commit 3c9a690

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

lib/node_modules/@stdlib/repl/scripts/browser.js

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var DOCS = docs();
2121
// FUNCTIONS //
2222

2323
/**
24-
* Returns help information.
24+
* Prints help information.
2525
*
2626
* @private
2727
* @param {*} alias - variable alias or value
@@ -51,6 +51,21 @@ function help( alias ) {
5151
console.log( txt );
5252
} // end FUNCTION help()
5353

54+
/**
55+
* Prints the list of namespace aliases.
56+
*
57+
* @private
58+
*/
59+
function ns() {
60+
var keys;
61+
var i;
62+
63+
keys = getKeys( DOCS );
64+
for ( i = 0; i < keys.length; i++ ) {
65+
console.log( keys[ i ] );
66+
}
67+
} // end FUNCTION ns()
68+
5469

5570
// MAIN //
5671

@@ -73,7 +88,9 @@ function main() {
7388
// Create an object tree from value aliases...
7489
tmp = {
7590
'help': help,
76-
'_help': help // Firefox devtools already aliases `help` (and `?`) to a read-only value :(
91+
'_help': help, // Firefox devtools already aliases `help` (and `?`) to a read-only value :(
92+
'require': require,
93+
'namespace': ns
7794
};
7895
paths = [];
7996
for ( i = 0; i < NAMESPACE.length; i++ ) {

0 commit comments

Comments
 (0)