4 ms·
Ha, I remember this package. It's a dependency of a dependency of a dependency in several projects inside the company I work for. I think either React, Babel, o
by jeroenhd 5y ago
Ha, I remember this package. It's a dependency of a dependency of a dependency in several projects inside the company I work for. I think either React, Babel, or Webpack depended on it at some point in time.
Nobody needs to write satire about the state of Javascript package management when people write (and use!) libraries like these.
- sulam 5y agoThe writing, okay, fine, dude was having some fun. Actually depending on it? Sigh.
- smt88 5y agoThis package certainly seems like satire. It has no actual implementation in it. Instead it depends on another npm package: `is-odd`. https://github.com/i-voted-for-trump/is-even/blob/master/package.json https://github.com/i-voted-for-trump/is-even/blob/master/pac...
- ratww 5y ago`is-odd` is made by the same developer. This was created to inflate NPM numbers.
- 3pt14159 5y agoThis is what I like about ruby. I search, I find, they have almost no downloads: https://rubygems.org/gems/is_odd/versions/0.1.1 https://rubygems.org/gems/is_odd/versions/0.1.1 https://rubygems.org/gems/is_even/versions/0.1.0 https://rubygems.org/gems/is_even/versions/0.1.0
- rezonant 5y agoIt is built into Ruby. 2.7.3 :003 > 1.odd? => true 2.7.3 :004 > 2.odd? => false 2.7.3 :005 > 1.even? => false 2.7.3 :006 > 2.even? => true 2.7.3 :007 >
- 3pt14159 5y agoThat's amazing. Do you know since when? I've been doing Python development for a while.
- rezonant 5y agoAt least since 1.8.7 (released May 31, 2008) EDIT: Confirmed, it was added in 1.8.7 according to Ruby Docs [1] [2] [1] https://ruby-doc.org/core-1.8.7/Integer.html https://ruby-doc.org/core-1.8.7/Integer.html (present) [2] https://ruby-doc.org/core-1.8.6/Integer.html https://ruby-doc.org/core-1.8.6/Integer.html (not present)
- deleted 5y ago[deleted]
- cormacrelf 5y agoThe “Usage” section in the readme doesn’t even give you any information about how it behaves on inputs that aren’t numbers. I hope the is-odd package has some way of detecting whether the input is a number or not. Maybe other packages need this too! isEven(0); //=> true isEven('1'); //=> false isEven(2); //=> true isEven('3'); //=> false
- Farow 5y agoIt throws an error on empty or non-integer values: https://github.com/i-voted-for-trump/is-even/blob/master/test.js#L29 https://github.com/i-voted-for-trump/is-even/blob/master/tes...
- slmjkdbtl 5y agoYou use the is-number package to check if something is a number. JavaScript packages do one thing and do it well.
- pram 5y agoHilarious GH name, and apparently masterful troll.
- Akronymus 5y agoSeems to me that the name is satire. As in, the author didn't actually vote for trump but wants to make it look like people that voted for him are creating packages like that. I don't think such packages should be on NPM either way.
- op00to 5y agoThe author is an antivaxer and based on that it is a fair shake that he voted for Trump.
- kej 5y agoHis twitter feed is full of right wing talking points and he broke a 19 year voting hiatus to vote in the 2020 general election, so I don't think it's that unreasonable to think he did, in fact, vote for Trump.
- capableweb 5y agoThis is the user: https://github.com/i-voted-for-trump https://github.com/i-voted-for-trump This is what it says there: > This is a joke. You'll only see this org if you are attempting to troll me about repositories I created when I was learning to program.
- JasonCannon 5y agoThis is his twitter https://mobile.twitter.com/jonschlinkert https://mobile.twitter.com/jonschlinkert He definitely voted for trump.
- madacol 5y agoHe probably moved that repo away from his profile (https://github.com/jonschlinkert https://github.com/jonschlinkert) to avoid being trolled
- moojd 5y agoI wish some of these large projects would start seriously auditing their dependencies and stop pulling in dependencies that have many dependencies themselves. There is a one-two punch of a culture of "there's a package for that" and npm not requiring flat dependency trees by default. The denial in the node community that npm is uniquely bad is frustrating. I want the community to stop denying and own these issues so things can get better. It's going to take the authors of large packages to start evangelizing the use of fewer, higher quality packages, using flat dependency trees, and re-implementing trivial functions instead of adding another node to trust.
- ratww 5y agoIt is an uphill battle, lemme tell you. There is a bit of a culture clash inside Javascript. Even when you're a veteran contributor, sometimes maintainers resist changing packages, as simple as they are, because there is an implicit assumption that popular packages, or even packages with too many dependencies are "better" or "handled all the edge cases". Even with careful evaluation of the options and a write-down of issues and a proper comparison, you need ten times as much energy to remove a package than it took to add it. It's even worse is when "too many packages" is in the DNA of the package you're collaborating.
- phist_mcgee 5y agoDon't forget too that npm by default allows minor version upgrades with the ^ prefix for version numbers, which means that unless you properly lock your dependencies, you can reintroduce changes over time, just by running npm install.