3 ms·
If you’re interested in a case of unnecessary optimization and effort, the infamous left-pad npm library has been refactored to only add to the string O(log(n))
by otras 7y ago
If you’re interested in a case of unnecessary optimization and effort, the infamous left-pad npm library has been refactored to only add to the string O(log(n)) times. It is short but not sweet.
https://github.com/left-pad/left-pad#readme https://github.com/left-pad/left-pad#readme
- ksaj 7y agoI think it needs more // comments. Hilarious.