Socket
Book a DemoInstallSign in
Socket

string-editor

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string-editor

Edit a string using $EDITOR from within your node app.

latest
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

string-editor

Edit a string using $EDITOR from within your node app.

npm install string-editor

Usage

var edit = require('string-editor');

// this launches your $EDITOR with a tmp file containing "hello world"
edit('hello world', function(err, result) {
	// when you are done editing result will contain the string
	console.log(result);
});

Sometimes it can be useful to set an filename to help your editor to enable highlighting etc.

// we pass app.js as a filename to help with highlighting
edit('var a = 42;', 'app.js', function(err, result) {
	console.log(result);
})

Note that app.js will still be a tmp file

License

MIT

Keywords

string

FAQs

Package last updated on 20 Apr 2015

Did you know?

Socket

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.

Install

Related posts