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.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
example
README.md
edit.js
package.json

README.md

node-edit

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.

Install

npm install node-edit

Instructions

var edit = require('node-edit');
edit("# Example\n# Commented lines will be stripped", function(newText) {
  console.log(newText);
});

This will output the files new contents, or false if they have not changed: Note: Comments are stripped.