![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
repl-story
Load history into node repl
const replHistory = require('repl-story');
const replServer = replHistory('~/.my.wonderful.cli');
// play around in repl
// you can consult history using command .history
replHistory
supports differents signatures:
replHistory(filename, [repl|replServer]); // original signature similar to repl.history
replHistory(options);
replHistory(filename, options);
// -> REPLServer
Here are the different possible params:
filename
or historyFile
: the path toward the history file. filename
is mandatory.
However you can skip it and provide it via the options
argument as the filename
property (you can also use the alias historyFile
).
replServer
or repl
: either the repl
module, or a ReplServer
. [default the require('repl')
builtin library]
an options
object, this give you better control over repl
and repl-story
configuration.
This is a plain old js object that support the following properties
filename
or historyFile
: if not provided as leading argument, you can embed the file configuration into the option object.replServer
or repl
: either the repl
module, or a ReplServer
. [default the require('repl')
builtin library]create
or noCreate
: whether history file should be created if missing [default: create=true
]record
or noRecord
: whether new history should be recorded [default: record=true
]ignore
: an array of values that should not be recorded into historyrepl.start()
if you did not provided a ReplServer
instance, such as:
prompt
: optional prompt to use [default '> '
]input
: Readable stream to read from [default 'process.stdin
]output
: Readable stream to write to [default process.stdout
]repl.start()
supports like eval
, writer
, completer
, useColors
; terminal
replMode
replHistory()
return the REPLServer
instance you provided, or otherwise the one it started.
Here is an example to illustrate how to configure repl-story
:
const repl = require('repl');
const replHistory = require('repl-story');
const replServer = replHistory({
repl,
filename: '~/.my.cli',
record: false, // load history but do no record it. (equivalent to 'noRecord: true')
noCreate: true, // disable creation if missing. (equivalent to 'create: false')
prompt: ':> ' // options are forwarded to repl.start() if no provided replServer
});
This started as the adaptation of repl.history to current node Apis.
And why story? repl-history
was already taken :wink:
FAQs
Load history into node repl
The npm package repl-story receives a total of 211 weekly downloads. As such, repl-story popularity was classified as not popular.
We found that repl-story demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.