Re:Node.js Fundamentals: Web Server Without Dependencies
by keketi on Sunday December 23, 2018 @05:48PM
(#18748902)
But can it left pad a string?
[ Parent
| on HN ]
Re:Node.js Fundamentals: Web Server Without Dependencies
by dang on Sunday December 23, 2018 @06:35PM
(#18749161)
Please don't do this here.
Re:Node.js Fundamentals: Web Server Without Dependencies
by Siilwyn on Sunday December 23, 2018 @06:21PM
(#18749084)
Yes, it is called `padStart`: https://devdocs.io/javascript/global_objects/string/padstart
Re:Node.js Fundamentals: Web Server Without Dependencies
by GordonS on Sunday December 23, 2018 @06:10PM
(#18749029)
JavaScript has come a long way in recent years, but the lack of a comprehensive standard library is still absolutely mind boggling.
Re:Node.js Fundamentals: Web Server Without Dependencies
by paulddraper on Sunday December 23, 2018 @08:16PM
(#18749594)
JavaScript's standard library has a fair amount.
Not Python levels of completeness, but near Java levels.
The parent's example is String.prototype.padStart() [1]
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Re:Node.js Fundamentals: Web Server Without Dependencies
by emilfihlman on Sunday December 23, 2018 @07:40PM
(#18749448)
This is really pretty sad. A standard library is paramount to a stable and easy to develop ecosystem.
Re:Node.js Fundamentals: Web Server Without Dependencies
by hombre_fatal on Sunday December 23, 2018 @07:42PM
(#18749456)
It may be, but this is a weird thread to bring that up since Javascript has padStart, and TFA is about building a web server with only the standard library.
Re:Node.js Fundamentals: Web Server Without Dependencies
by nurettin on Monday December 24, 2018 @02:15AM
(#18750890)
the OP was referring to this incident https://github.com/stevemao/left-pad/issues/4
where a very basic package everyone depended on was yanked from npmjs.
azer's original post: https://news.ycombinator.com/item?id=11340510