Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
ui-component-library / dist / forms / input / ReactChain.js
Size: Mime:
"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 @skava/modules/___dist
 */
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