A set of models to make it easier to utilize the powerful real time collaborative features of Lyra


950.3.03 years ago3 years agoMinified + gzip package size for @lyra/mutator in KB



Build Status


  • Lyra flavored jsonpath matching engine with flexible interface that plays well with React
  • An implementation of the mutation operations of Lyra that can be applied to vanilla javascript objects, or through a flexible interface: any weird document representation you may require
  • TODO: A model to track documents as they are mutated both locally and remotely through the real time query feature of Lyra
  • Note: If patch.id doesn't match document._id, the patch will be ignored during apply.


import {Patcher} from '@lyra/mutator'

const document = {
  _id: 'a1b2c3',
  a: {}

const patcher = new Patcher({
  id: 'a1b2c3',
  set: {
    'a.b': 'My new value'


=> {
  _id: 'a1b2c3',
  a: {
    b: 'My new value'

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.