Repository URL to install this package:
|
Version:
2.0.3 ▾
|
"use strict";
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", {
value: true
});
const react_1 = __importDefault(require("react"));
/**
*
* @todo should split ReactChain to uxui-modules
*/
class ReactChain extends react_1.default.Component {
get(key) {
return this.store.get(key);
}
has(key) {
return this.store.has(key);
}
clear() {
this.store.clear();
return this;
}
set(key, value) {
this.store.set(key, value);
return this;
}
delete(key) {
this.store.delete(key);
return this;
}
merge(obj) {
Object.keys(obj).forEach(key => {
let val = obj[key];
if (this.has(key)) {
val = [this.get(key), val];
}
return this.set(key, val);
});
return this;
}
}
exports.ReactChain = ReactChain;
exports.default = ReactChain; //# sourceMappingURL=ReactChain.js.map