Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Use your text editor to edit commands in Node's repl.
npm install repl-edit
You can fire up a repl with editing capabilities by running node-repl-edit
.
(It would be nice to extend an existing repl session but that's not possible with Node's repl module right now.)
The first time you run edit()
in a repl a temporary file is created, specific to that session,
and opened in your editor. Type away and then save and close the file when you're done. The file
will be loaded and executed at that time.
To run whatever command you've been working on without editing it again type run()
.
setEditor('mate -w')
will change your editor to TextMate for this session. Note that this
command changes the environment variable EDITOR for the repl process.
stash('/path/to/a/file')
will save your command to the named file.
unstash('/path/to/a/file')
will restore the contents of that file for you to run and/or edit.
Instead of polluting the global namespace with functions I'd rather extend Node's repl
to allow user-defined dot commands (just like .break
and .clear
), and then use that
capability to provide commands like .edit
and .stash <filename>
.
The first time edit() is run in a repl instead of an empty file the command should be seeded with the last command that was executed.
If the native repl module exports the currently running repl object it will be possible to attach to an existing repl instead of having to run a separate binary that loads a repl.
Copyright 2010 Sami Samhuri sami@samhuri.net
MIT (see the file named LICENSE)
FAQs
Edit code in the repl using a real text editor
The npm package repl-edit receives a total of 0 weekly downloads. As such, repl-edit popularity was classified as not popular.
We found that repl-edit 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.