index.js
536 Bytes
// Generated by CoffeeScript 1.10.0
(function() {
var cache, extend, loadSecrets, yaml;
yaml = require('js-yaml');
extend = require('extend');
loadSecrets = require('yael-autoencrypt');
cache = null;
module.exports = function(options) {
var all_secrets;
if ((options == null) && (cache != null)) {
return cache;
}
all_secrets = yaml.safeLoad(loadSecrets(options));
cache = {};
extend(cache, all_secrets['common'], all_secrets[process.env.NODE_ENV]);
return cache;
};
}).call(this);