llama icon indicating copy to clipboard operation
llama copied to clipboard

Add updateIn, getIn, setIn, removeIn

Open benbrimeyer opened this issue 3 years ago • 2 comments

I'm back from #4.

Adds the following methods to Dictionary:

  • updateIn(dictionary, keyPath, updater, notSetValue)
  • getIn(dictionary, keyPath, default)
  • setIn(dictionary, keyPath, newValue)
  • removeIn(dictionary, keyPath)

Implementations and test cases are similar to Immutable.js's implementations of these methods.

Todo:

  • [x] Implementation
  • [x] Write tests
  • [ ] Make sure this is something we would want to add
  • [ ] Documentation

benbrimeyer avatar Apr 07 '22 05:04 benbrimeyer

@freddylist Should I proceed with this PR? I'd like to get the greenlight that this is something worth contributing.

benbrimeyer avatar Apr 19 '22 14:04 benbrimeyer

Hello, thanks for the PR!

Any new features to Llama are probably not worth pursuing at the moment; I have just updated the readme with a notice that I will no longer be maintaining Llama.

If it's ok with you, I will just leave this PR hanging. :)

Thanks again!

freddylist avatar Apr 19 '22 17:04 freddylist