A loki-hooks factory function that turns a loki collection into a collection with immutable documents. Quering the collection will return immutable documents. Insert/update and remove return immutable documents. The insert and update methods accept immer drafts (created with createDraft) as documents. The insert and update methods will then emit insertEvent/updateEvent events with the document and the immer patches as arguments. The insertEvent/updateEvent and deleteEvent can be disable by setting its name to '' in the options.
collectionHooks.register'immutable', immutabletest'should make docs immutable, accept immer draft and emit immer patches',