soywod / react-pin-field

📟 React component for entering PIN codes.
https://soywod.github.io/react-pin-field/
MIT License
411 stars 23 forks source link

Remove lodash as dependency from prod build #22

Closed vikeri closed 4 years ago

vikeri commented 4 years ago

Lodash is very useful but also is pretty massive to bundle. The use case of lodash here could be replaced by simple functions. This resulted in a package size that was 73 KB smaller.

Demo page WITH lodash (217 KB)

bild

Demo page WITHOUT lodash (144 KB)

bild
codecov-commenter commented 4 years ago

Codecov Report

Merging #22 into master will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #22   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          161       166    +5     
  Branches        27        29    +2     
=========================================
+ Hits           161       166    +5     
Impacted Files Coverage Δ
src/pin-field/pin-field.tsx 100.00% <100.00%> (ø)

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 3972b95...ad9b088. Read the comment docs.

soywod commented 4 years ago

It's one of the task I wanted to do sooner or later, thanks a lot for this PR!

vikeri commented 4 years ago

@soywod Great! When is it expected to be released?

soywod commented 4 years ago

Now v1.0.5 :tada:

vikeri commented 4 years ago

🎉