Yomguithereal / baobab

JavaScript & TypeScript persistent and optionally immutable data tree with cursors.
MIT License
3.15k stars 116 forks source link

Map method for list #383

Open kirjs opened 9 years ago

kirjs commented 9 years ago

Hey, thanks for the lib,

  it('should be possible to map on Baobab instance of a list', function(){
        assert.strictEqual(typeof new Baobab([1,2]).map, 'function');
  });

I would expect the map function to consistently be there on all baobab instances of list, not just on Cursors.

Yomguithereal commented 8 years ago

Hello @kirjs, this is indeed a bug. This is because the tree object is in fact slightly different from the cursor one. I am sure @jacomyal would be glad to be part of this conversation :smile:.

Yomguithereal commented 8 years ago

Do you still need this @kirjs?