5 ms·
I got distracted by the > const pad = require('pad-left'); Just curious, not much has changed since the left-pad issue a while ago? Not saying it's wrong thoug
by afraca 8y ago
I got distracted by the
> const pad = require('pad-left');
Just curious, not much has changed since the left-pad issue a while ago? Not saying it's wrong though.
- gildas 8y agoIt has been standardized meanwhile, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- pavel_lishin 8y agoHm, at first I thought that they went with "padStart" instead of "padLeft" to address RTL languages, but the documentation still says > The padding is applied from the start (left) of the current string. I wonder if they just didn't want the "pad-left" stigma.
- JoshTriplett 8y agoMany current programming languages and libraries go with start/end rather than left/right precisely because of RTL languages. Clarifying "start (left)" doesn't seem unreasonable to help readers of English documentation understand, though it should probably say "start (left in left-to-right languages)".
- chrisfosterelli 8y agoIf this is a genuine question, NPM made quite a few changes, including no longer allowing package versions to be deleted after they've been up for more than 72 hours. It's not possible to "pull the plug" on an entire package that a lot of people are depending on anymore without working with NPM support.