Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
opts = {
loadParams: {
root: ILIB_MOONSTONE_PATH
},
...options
};
}
if (!opts.onLoad) return;
// Swap out app cache for moonstone's
const appCache = ilib.data;
ilib.data = global.moonstoneILibCache || cache;
// eslint-disable-next-line no-new
new ResBundle({
...opts,
onLoad: (bundle) => {
ilib.data = appCache;
opts.onLoad(bundle || null);
}
});
}
function createResBundle (options) {
const opts = {
type: 'html',
name: 'strings',
lengthen: true, // if pseudo-localizing, this tells it to lengthen strings
...options
};
if (!opts.onLoad) return;
// eslint-disable-next-line no-new
new ResBundle({
...opts,
onLoad: (bundle) => {
opts.onLoad(bundle || null);
}
});
}