1.0.0 • Published 9 years ago

from-env-or-file v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
9 years ago

from-env-or-file

Return an env var or the contents of a file.

var fromEnvOrFile = require('from-env-or-file')

fromEnvOrFile('foo', '/path/to/bar.txt', function (error, result) {
  console.info(result) // prints 'foo'
})

fromEnvOrFile(null, '/path/to/bar.txt', function (error, result) {
  console.info(result) // prints the contents of bar.txt
})