1.0.0 • Published 9 years ago
from-env-or-file v1.0.0
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
})
1.0.0
9 years ago