What

npmjs.com/package/is-odd

What...
What the fuck is wrong with these people?

Attached: E8ED1BE8-24B6-405C-A6F6-F2B96279E326.jpg (120x125, 11K)

Other urls found in this thread:

github.com/AssemblyScript/assemblyscript/blob/e049e72171e7bfc28af326a786ba508c09a6ecb8/src/types.ts#L18
twitter.com/AnonBabble

This is what you get when double precision floating point is the only numeric data type in your language.

Attached: file.png (731x478, 64K)

Even better is the is-even, it is just returning not is-odd.
This is hilarious, imagine some web dev actually googling this and the including this fucking package.

Java script doesn't have int's?
Just floats with nothing after the decimal point?

>weekly downloads
>407 141

Fuck these guys.

I'm sad that none of TypeScript nor Flow add support for Int vs Real (or fixed-sized integers types but I might want too much)

>There have been weeks where 3 million people couldn't figure out themselves to check if a number is odd.

Anons, how would you guy fake data? This can't possibly be true.

Attached: 1508735776063.png (940x232, 29K)

I'm convinced some node packages are their own joke, but people are too fucking stupid to notice and end up legitimately using them.

Does this guy have a buy me a coffee/donate button?

>make node package "is-even"
>use "is-odd" as a dependency
>return !isOdd(value)

nice thumbnail retard

leave him alone

whatever you say op

well the AssemblyScript version of Typescript has them
github.com/AssemblyScript/assemblyscript/blob/e049e72171e7bfc28af326a786ba508c09a6ecb8/src/types.ts#L18

Elegant solution

i saw 16 dependents and chuckled
> i saw 7 versions and damn near fell out of my seat

>25 commits

Is node what happens when there's a high number of incompetent programmers that exist?

Attached: 1487235720859.png (4000x3788, 616K)

>node, an engine which literally exists to make installing packages seamless
>installing hundreds of packages to do mundane shit like return (n % 2 == 0)
>the absolute state of webdev

yeah, node is for retards who can't write anything themselves

>120x125

Attached: 01eb1840.jpg (540x376, 32K)

Enjoy manually updating each and every instance of checking if a number is odd when an odd-number exploit is discovered.

Meanwhile, I just have to run npm update.

My OC gets reposted. Cool

Here is the full image.

Attached: 1527950758977.png (1030x1066, 162K)

does n % 2 even get optimized by js interpreter?
Is there any reason you wouldn't be using & 1 in javascript that I'm not aware of?

>optimzing javascript
it's a bit like trying to improve your running speed after crippling all your limbs

optimizations are done by a compiler, not by an interpreter, but yes, it most likely does

download 2010 chrome and do a benchmark comparing js performance with the current version

>1 million weekly downloads
Good god wtf is going on?

this is old as fuck but you get the idea

Attached: 1*ksFQo_CqXyvEkFFcXEtMRg.png (466x378, 60K)

Free software was a mistake.

>Dependencies: is-number

JavaScript just has the Number type.

It’s included in other packages that are popular.

The two approaches seem to be equally fast, at least in chrome (pic related, times are in milliseconds). Ignore the ugliness of the code, I can't program in javascript.

Attached: file.png (693x1585, 166K)

Attached: tfwnogf.jpg (800x800, 40K)

>Version 3.0.0

I actually laughed out loud.

isn't that !isNaN(number)

> require('is-number')

Attached: LEL.jpg (912x905, 94K)

btw that guy is a genius, he has like 300-600 npm package and a framework which uses those (if i remember the framework is really popular), so if someone use that one in a project he get like 300-600 downloads in the statistic.

and ye he does things like is-odd then is-even is just !is-odd, but he has packages for, odd and even which is basically is-even/is-odd used on lists

This is actually fucking hilarious. The ‘is-even’ package is even better.