default-editor
Get the user's default editor based on the environment variable $EDITOR
Install
$ npm install --save default-editor
Usage
The exe defined by $EDITOR is assumed to be in the $PATH
const defaultEditor = ; // macOSconsole;//=> 'vim' // Windowsconsole;//=> 'notepad.exe'
License
MIT © Sean Escriva
Credits
Directly based on https://github.com/sindresorhus/default-shell and probably less useful.