UNPKG

node-edit

Version:

Launch $EDITOR with a default set of text and allow the user to make changes. Strip out the comments and fire a callback with the new text, or false if the text has not changed.

6 lines (4 loc) 176 B
var edit = require('../edit.js'); edit("# This is an example\n# Comments will be ignored\n# Try adding some more text to this file", function(text) { console.log(text); });