Re:Ask HN: When do you use a library vs. implement something...
by Doxin on Friday April 20, 2018 @08:27AM
(#16884180)
The fact that there was a need for the left-pad module is pretty telling on how comprehensive the stdlib in js is.
[ Parent
| on HN ]
Re:Ask HN: When do you use a library vs. implement something...
by mort96 on Friday April 20, 2018 @02:06PM
(#16887055)
I wasn't really interested in your opinion based on the lack of one 1-line utility function (and it is one line: `new Array(10 - str.length).fill("0").join("") + str`). I was interested in what significant functionality OP found lacking in node.js' standard library.
Re:Ask HN: When do you use a library vs. implement something...
by Thiez on Friday April 20, 2018 @11:29AM
(#16885563)
Which programming language are you using that has left-pads functionality in the standard library?
Re:Ask HN: When do you use a library vs. implement something...
by mort96 on Friday April 20, 2018 @01:57PM
(#16886971)
Well, python's strings have the ljust and rjust methods which left- and right-pad, and javascript has the padStart and padEnd methods (since ECMAScript 2017).
Re:Ask HN: When do you use a library vs. implement something...
by scarface74 on Friday April 20, 2018 @07:09PM
(#16889044)