Ghost/core/server/utils/labs.js
Hannah Wolfe 4bfacf6b86 Change server-side labs utility to be synchronous
refs #6165

- Use the settings cache to populate config.labs whenever settings change
- Use the labs util just to check if a flag isSet synchronously
2015-12-03 16:05:50 +00:00

11 lines
223 B
JavaScript

var config = require('../config'),
flagIsSet;
flagIsSet = function flagIsSet(flag) {
var labsConfig = config.labs;
return !!labsConfig[flag] && labsConfig[flag] === true;
};
module.exports.isSet = flagIsSet;