123456789101112131415161718192021222324252627282930313233343536373839 |
- const {addReadProp} = require('./utils');
- class InnerState {
- constructor(initialState) {
- addReadProp(this, '_inner', {}, true);
- if (initialState && typeof initialState === 'object') {
- this.extendState(initialState);
- }
- }
-
- extendState(state) {
- for (const a in state) {
-
- if (Object.prototype.hasOwnProperty.call(state, a)) {
- this._inner[a] = state[a];
- }
- }
- }
- }
- module.exports = {InnerState};
|