javascript icon indicating copy to clipboard operation
javascript copied to clipboard

feat: add formatPhone

Open linconkusunoki opened this issue 6 years ago • 6 comments

related: #146

linconkusunoki avatar Sep 25 '20 09:09 linconkusunoki

Codecov Report

Merging #155 into main will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #155   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           51        51           
  Lines          938       955   +17     
  Branches       113       122    +9     
=========================================
+ Hits           938       955   +17     
Impacted Files Coverage Δ
src/utilities/index.ts 100.00% <100.00%> (ø)
src/utilities/phone/index.ts 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 8a45427...400c0f1. Read the comment docs.

codecov[bot] avatar Sep 25 '20 09:09 codecov[bot]

Hello nice MR @linconkusunoki and thanks @pedrovsp for the review! Another thing that I think could be improved is the removal of the config param... I know that I've suggested this but looking at the code and the test cases, maybe its better to just format the prefix when receiving this prefix. Something like:

format('5133333333') // (51) 3333-3333
format('555133333333') // +55 (51) 3333-3333

What do you think about it?

hyanmandian avatar Oct 06 '20 13:10 hyanmandian

hey guys thanks for the feedback and sorry for the late, I'll work on these changes

linconkusunoki avatar Oct 14 '20 16:10 linconkusunoki

I like the idea of receiving the phone number and format the country code if it is present (eg. length > 11).

rfoel avatar Oct 19 '20 15:10 rfoel

Hello guys, do you need some help?

hyanmandian avatar Dec 07 '20 20:12 hyanmandian

hey @hyanmandian for me it's ok if anyone wants to get this task #186, maybe close this PR and open another one?

linconkusunoki avatar Dec 16 '20 09:12 linconkusunoki