rtfeldman / seamless-immutable

Immutable data structures for JavaScript which are backwards-compatible with normal JS Arrays and Objects.
BSD 3-Clause "New" or "Revised" License
5.36k stars 194 forks source link

Drop-in replacement from facebook's Immutable.js? #213

Open maxgalbu opened 7 years ago

maxgalbu commented 7 years ago

Can this replace facebook's immutable library? We're experiencing some big cpu usage and garbage collector runs on our app, and we were trying to isolate the problem.

I'm not sure about the functionality, but from my quick test, it's missing two functions (I'm excluding fromJS because there's from()): toJS and get. Probably toJS() could be implemented simply with:

function toJS(obj) {
      return asDeepMutable(obj);
  }

I'm not sure about get()..

srph commented 7 years ago

Doesn't Immutable.asMutable(obj, {deep: true}) solve toJS?

maxgalbu commented 7 years ago

Yep that's what I wrote before :)

crudh commented 5 years ago

@maxgalbu late answer, but is getIn similar?