Package Exports
- repl-story
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (repl-story) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
repl-story
Load history into node repl
Basic Usage
const repl = require('repl');
const replHistory = require('repl-story');
const filename = '~/.my.cli'
const replServer = replHistory({repl, filename});
// play around in repl
// you can consult history using command .historyApi
replHistory(options);
The two mantary field of options are:
replServerorrepl: either thereplmodule, or aReplServerfilenameorhistoryFile: path toward the history file
Here is the other facultative options that can be provided to replHistory:
prompt: optional prompt to use if did not provided aReplServerinstancecreateornoCreate: whether history file should be created if missing [default:create=true]recordornoRecord: whether new history should be recorded [default:record=true]ignore: an array of values that should not be recorded into history
replHistory() return the ReplServer instance you provided, or otherwise the one it started.
Acknowledgment
This is the adaptation of repl.history to current node Apis.
And why story? repl-history was already taken 😉