Ghost/ghost/config-url-helpers/index.js

16 lines
463 B
JavaScript
Raw Normal View History

const configUrlHelpers = require('./lib/config-url-helpers');
2021-06-17 14:04:20 +03:00
/**
* @typedef {Object} BoundHelpers
* @property {configUrlHelpers.getSubdirFn} getSubdir
* @property {configUrlHelpers.getSiteUrlFn} getSiteUrl
* @property {configUrlHelpers.getAdminUrlFn} getAdminUrl
*
* @param {*} nconf
*/
module.exports.bindAll = (nconf) => {
Object.keys(configUrlHelpers).forEach((helper) => {
nconf[helper] = configUrlHelpers[helper].bind(nconf);
});
};