isaacs/osenv — pull request #5 by kelsin (2014-11-22 22:29:09+00:00)
Title: Allow users to set a custom editor env variable

Many programs allow a custom editor variable to override EDITOR. Now users can
set that on osenv with the following code:

var osenv = require('osenv')
osenv.setCustomEditorVariable('MY_EDITOR')

var editor = osenv.editor()

If the MY_EDITOR environment variable is set, it will be used. Otherwise we
follow the same rules that osenv has used before.

One confusing point is that if you set the custom editor variable after calling
.editor() the previous result will be cached and this will have no effect.