Yomguithereal / baobab

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

how to remover a listener #482

Open sutinghui24 opened 7 years ago

sutinghui24 commented 7 years ago

when I use cursor.on('update',fun) how to remover the listener. No cursor.release() because has other listener

sutinghui24 commented 7 years ago

I have read the document again and not find.Who can tell me

Yomguithereal commented 7 years ago

Hello @sutinghui24. Baobab uses the Emmett library to emit events. Here is the documentation related to removing listeners.

Quick example:

cursor.off('event', listener);