calmm-js / partial.lenses

Partial lenses is a comprehensive, high-performance optics library for JavaScript
MIT License
915 stars 36 forks source link

Added `branchOr` #139

Closed polytypic closed 6 years ago

polytypic commented 6 years ago

This changes the behaviour of L.branch({}), which was previously treated as a special case. Actually, the old behaviour was reasonable and was based on the idea that when writing through either the L.branch or the L.values traversal, the result will be an object in case the traversal actually targets something. So, for example, writing with L.values through a non-object results in the non-object and writing through L.branch({}) is a no-op, because neither targets any elements.

codecov-io commented 6 years ago

Codecov Report

Merging #139 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #139   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines         971    977    +6     
=====================================
+ Hits          971    977    +6
Impacted Files Coverage Δ
dist/partial.lenses.cjs.js 100% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b36853e...e268a31. Read the comment docs.