Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Isn’t that just a single basic function that someone put in a package for some dumb reason?
-
pk7611705y@Plasticnova wasn't*
Unless he uploaded it again. The author had pulled it from NPM and sparked a big controversy a few years ago. -
So I found the code, totally made for lazy people
@highlight
module.exports = leftpad;
function leftpad (str, len, ch) {
str = String(str);
var i = -1;
if (!ch && ch !== 0) ch = ' ';
len = len - str.length;
while (++i < len) {
str = ch + str;
}
return str;
} -
Yeah that's why I still do a lot myself in vanilla js. Why the fuck would you need al those fucking packages? Of course, when you need to pad a string, convert something to pascal case, etc, there's a module for that!
-
I gotta know, what is this project? Just basic functionality. 50 something dependencies, surely there is some need right.... right?
-
@ilikeglue with npm, quite possibly
I just wouldn’t install a package for a tiny function like that, I’d just write the function. It wouldn’t even occur to me to look for a package like this -
Mr-Myrk5325y@Plasticnova Just a frontend for an API, that I am managing, the API depends on10 things, of which 6 are external
"require": {
"php": ">=7.3",
"ext-pdo": "*",
"ext-json": "*",
"ext-memcached": "*",
"vlucas/phpdotenv": "^3.4",
"guzzlehttp/guzzle": "^6.3",
"php-di/php-di": "^6.0",
"nikic/fast-route": "^1.3",
"symfony/http-foundation": "^4.3",
"robmorgan/phinx": "^0.10.8"
}, -
I checked an old project and I do see how the number can build somewhat quickly. I had to have 9 damn packages for fontawsome because the project used icons from all the various pro packs. 9 entries just for fonts, and vue had several as well
-
@Mr-Myrk from that link:
Can I buy an enterprise license?
Yes. Email root@left-pad.io with your account and ABA routing numbers.
You’ve got to be shitting me, tell me this is satire. Never mind it is, or I give up -
You know, with software patents this could end up being a thing. Someone creates some unique (or not unique) software (algorithm, concept, etc) and gets it patented. Then they create microservice to allow apps to use this code for a usage fee. It could be a single function.
-
@Demolishun close but they don’t actually need to build anything exactly. They’ll get the bullshit patent (easy to do), threaten an infringement suit, and roll the dice on whether they will settle with some royalty agreement or go to court. If you pass up on settling because you know the claims are bullshit, better hope you can afford the fight because it truly does come down to money. What’s more likely to happen is even if you were to win, the claims are all dismissed, and you get a protective order, you still might go bankrupt from the battle. Then they just swoop in and buy the assets in bankruptcy, getting what they want in the end anyways.
Related Rants
Love it when you open up a frontend devs project and among some 50 included npm packages for a really simple project you see this
rant
js
left-pad
frontend