... I separated out the hashPath function into the helpers.js file so it could be also used in monkey.js.
I then went ahead and manually updated the tree._affectedPathsIndex from within monkey.js... This aspect feels hacky as I'm directly updating the private variable of the baobab tree... That said, I did see several other instances updated tree._data and didn't want to take to many liberties restructuring.
Possibly a tree.addAffectedPath() method could be created to abstract away any access to private vars.
So this pull request does work as is, but could possibly be improved upon. Let me know what it needs to be pulled.
... I separated out the
hashPath
function into thehelpers.js
file so it could be also used inmonkey.js
.I then went ahead and manually updated the
tree._affectedPathsIndex
from withinmonkey.js
... This aspect feels hacky as I'm directly updating the private variable of the baobab tree... That said, I did see several other instances updatedtree._data
and didn't want to take to many liberties restructuring.Possibly a
tree.addAffectedPath()
method could be created to abstract away any access to private vars.So this pull request does work as is, but could possibly be improved upon. Let me know what it needs to be pulled.
Thanks for the great library!