sprintf.js icon indicating copy to clipboard operation
sprintf.js copied to clipboard

Coding problem

Open rechmbrs opened this issue 6 years ago • 3 comments

I believe that line: pad_character = ph.pad_char ? ph.pad_char === '0' ? '0' : ph.pad_char.charAt(1) : ' ' should be: pad_character = ph.pad_char ? (ph.pad_char === '0' ? '0' : ph.pad_char.charAt(1)) : ' '

Missing parenthesis.

RONC

rechmbrs avatar Jan 04 '20 16:01 rechmbrs

Hey @rechmbrs, thanks for your input. If you think that line is erroneous, please provide a test or two as proof.

alexei avatar Jan 06 '20 10:01 alexei

Alexandru, The line would not pass a Lint test. I haven't gotten the file to work yet and went to Lint to make sure I have a chance of it working. I'll try some more but there is still a problem overall. I don't know if the suggestion I make is correct but it passes the Lint test. RONC

On Mon, Jan 6, 2020 at 4:26 AM Alexandru Mărășteanu < [email protected]> wrote:

Hey @rechmbrs https://github.com/rechmbrs, thanks for your input. If you think that line is erroneous, please provide a test or two as proof.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alexei/sprintf.js/issues/185?email_source=notifications&email_token=ABAYIOUO3KDEVLFGEGXY353Q4MBORA5CNFSM4KCWX2WKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIFBOBI#issuecomment-571086597, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABAYIOTGL3IITBATOAGARDDQ4MBORANCNFSM4KCWX2WA .

--

*Ronald E Chambers1713 Twila LnConroe, TX 77301-1175C - 713.806.6304E

rechmbrs avatar Jan 06 '20 19:01 rechmbrs

You can open a PR, though the current linter doesn't mind that line

alexei avatar Jan 13 '20 10:01 alexei