novar-settings

node v4.9.1
version: 1.0.0
endpointsharetweet
const settings = exports = module.exports = {}; settings.initSettings = function init() { this.settings = {}; } settings.getSetting = function getSetting(setting, defaultValue) { if (this.settings && typeof this.settings[setting] !== 'undefined') { // look in settings return this.settings[setting]; } else if (this.settings && this.settings.public && typeof this.settings.public[setting] !== 'undefined') { // look in settings.public return this.settings.public[setting]; } else if (defaultValue) { return defaultValue; } return undefined; }
Loading…

no comments

    sign in to comment