Repository URL to install this package:
|
Version:
1.2.9 ▾
|
"use strict";
const _require = require("./Chains"),
ChainedMap = _require.ChainedMap,
dopemerge = _require.dopemerge;
module.exports = class extends ChainedMap {
constructor(parent) {
super(parent); // @chainup
this.use = this.parent.use;
this.rule = this.parent.rule;
this.extend(['loader', 'options']);
}
tap(f) {
this.options(f(this.get('options')));
return this;
}
merge(obj) {
if (obj.loader) {
this.loader(obj.loader);
}
if (obj.options) {
this.options(dopemerge(this.store.get('options') || {}, obj.options));
}
return this;
}
toConfig() {
return this.clean(this.entries() || {});
}
};