3 ms·
There is not even a link to the source code on the npm page for it. I installed it and inspected the source code, but I doubt everyone does this when installing
by reeeeee 7y ago
There is not even a link to the source code on the npm page for it. I installed it and inspected the source code, but I doubt everyone does this when installing a dependency.
- delfaras 7y agoHere's the complete source for anyone curious ``` exports = module.exports = trim; function trim(str){ return str.replace(/^\s|\s$/g, ''); } exports.left = function(str){ return str.replace(/^\s/, ''); }; exports.right = function(str){ return str.replace(/\s$/, ''); }; ```
- rjmunro 7y agoThat code doesn't match what actually happens. It will only trim a single character. Have asterisks been trimmed in your copy-paste or something?
- delfaras 7y agoAh you're right, the asterisks have been interpreted as italics. Can't edit my comment, sorry Here's a paste: https://pastebin.com/kBHprdyj https://pastebin.com/kBHprdyj