Quantumbraid's picture
download
raw
703 Bytes
function createPlugin(plugin, config) {
return {
handler: plugin,
config,
}
}
createPlugin.withOptions = function (pluginFunction, configFunction = () => ({})) {
const optionsFunction = function (options) {
return {
__options: options,
handler: pluginFunction(options),
config: configFunction(options),
}
}
optionsFunction.__isOptionsFunction = true
// Expose plugin dependencies so that `object-hash` returns a different
// value if anything here changes, to ensure a rebuild is triggered.
optionsFunction.__pluginFunction = pluginFunction
optionsFunction.__configFunction = configFunction
return optionsFunction
}
export default createPlugin

Xet Storage Details

Size:
703 Bytes
·
Xet hash:
9c32d29c9b76dbbc5b935bbddbd453374fbbd789b05b6a69a3ef167ff60b4d99

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.