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

Add support of negative indexes in array notation #291

Closed frinyvonnick closed 6 years ago

frinyvonnick commented 6 years ago

Prerequisites

Description

Add support of negative indexes in array notation Issue : #169

codecov-io commented 6 years ago

Codecov Report

Merging #291 into dev will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@         Coverage Diff         @@
##            dev   #291   +/-   ##
===================================
  Coverage   100%   100%           
===================================
  Files        97     97           
  Lines       280    285    +5     
===================================
+ Hits        280    285    +5
Impacted Files Coverage Δ
packages/immutadot/src/path/apply.js 100% <100%> (ø) :arrow_up:
packages/immutadot/src/path/utils.js 100% <100%> (ø) :arrow_up:
packages/immutadot-parser/src/utils.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 09ecc6d...0e1666d. Read the comment docs.

nlepage commented 6 years ago

I fixed the failing test with a new recursive call to walkPath. We still have to address the "out of bound" negative index problem (somehow it appears outdated).

nlepage commented 6 years ago

I fixed the out of bounds negative array index case and added a test. I wait for your textual approval since I'm the reviewer here :wink:

frinyvonnick commented 6 years ago

LGTM 👍