Skip to content

Ability to bind the chain mode to a slice of the object #32

Open
@mariocasciaro

Description

@mariocasciaro

immutable(object, 'path.to.slice')

const obj = {
  a: {
    b: 's1',
    c: 1
  }
}

immutable(obj, 'a')
  .set('b', 's3')
  .update('c', (v) => v+1)
  .value() 

/*
returns {
  a: {
    b: 's3',
    c: 2
  }
}
*/

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions