Skip to content

Commit

Permalink
Merge branch 'master' into greenkeeper/nyc-13.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
taras committed Feb 5, 2019
2 parents b1617d5 + a8b8e4f commit 688e831
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/identity.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { foldl } from 'funcadelic';
import { promap, valueOf, pathOf, Meta, mount } from './meta';
import CachedProperty from './cached-property';
import { methodsOf } from './reflection';
import { isArrayType } from './types/array';
import { create } from './microstates';
Expand Down Expand Up @@ -62,8 +61,6 @@ export default function Identity(microstate, observe = x => x) {
}
}

let descriptors = Object.getOwnPropertyDescriptors(Type.prototype);

let methods = Object.keys(methodsOf(Type)).concat(["set"]);

Object.assign(Id.prototype, foldl((methods, name) => {
Expand All @@ -84,14 +81,6 @@ export default function Identity(microstate, observe = x => x) {
return methods;
}, {}, methods));

Object.keys(descriptors).forEach(propertyName => {
let desc = descriptors[propertyName];
if (typeof propertyName === 'string' && typeof desc.get === 'function') {
let property = new CachedProperty(propertyName, self => desc.get.call(self));
Object.defineProperty(Id.prototype, propertyName, property);
}
});

return Id;
}
update(microstate);
Expand Down

0 comments on commit 688e831

Please sign in to comment.