zenika-open-source / immutadot

immutadot is a JavaScript library to deal with nested immutable structures.
https://immutadot.zenika.com
MIT License
178 stars 5 forks source link

Lazy get #266

Closed nlepage closed 6 years ago

nlepage commented 6 years ago
flow(
  update('nested.a', (a, b) => a * b, get('nested.b')),
  update('nested.c', (c, a) => c + a, get('nested.a')),
)({
  nested: {
    a: 3,
    b: 4,
    c: 10,
  },
})

// {
//   nested: {
//     a: 12,
//     b: 4,
//     c: 22,
//   },
// }
codecov-io commented 6 years ago

Codecov Report

Merging #266 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #266   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          95     95           
  Lines         268    276    +8     
=====================================
+ Hits          268    276    +8
Impacted Files Coverage Δ
packages/immutadot/src/path/apply.js 100% <100%> (ø) :arrow_up:
packages/immutadot/src/core/get.js 100% <100%> (ø) :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 a7616df...f43a4ba. Read the comment docs.