i-voted-for-trump/is-odd
View on GitHub ↗ ★ 364 JavaScript archived
I created this in 2014, the year I learned how to program. All of the downloads are from an old version of https://github.com/micromatch/micromatch. I've done a few other things since: https://github.com/jonschlinkert.
11 mentions on Hacker News by 11 people: 1 story, 10 comments · first 2018-05-24 · latest 2024-03-05
20082026
-
…dependencies in some serious stuff. Do I agree? I'm not really sure to be honest. Probably not. [0] https://github.com/i-voted-for-trump/is-odd/blob/master/READ... [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... EDIT:…
comment by karim79 · 2024-03-05 · in Why Does 'Is-Number' Package Have 59M Weekly Downloads? -
Here you go: /*! * is-odd <https://github.com/jonschlinkert/is-odd> * * Copyright (c) 2015-2017, Jon Schlinkert. * Released under the MIT License. */ 'use strict'; const isNumber = require('is-number'); module.exports = function…
comment by umanwizard · 2023-12-28 · in 4B If Statements -
…arguments about "covering edge cases you didn't think of" and I disagree. Look at the actual code: https://github.com/i-voted-for-trump/is-odd/ There's a "tested edge case" where you can check isOdd('1') and it will work - to me the code…
comment by technion · 2023-09-22 · in Speeding up the JavaScript ecosystem – Polyfills gone rogue -
…files (package.json + typescript files + linter config + readme + git config + ...). This file: https://github.com/i-voted-for-trump/is-odd/blob/master/inde... is downloaded over 400000 times per week ( https://www.npmjs.com/package/is-odd…
comment by jeroenhd · 2022-09-14 · in Vendor by Default (2021) -
…for that: https://github.com/jonschlinkert?tab=repositories He abandoned the projects, but: * https://github.com/jonschlinkert/is-odd * https://github.com/jonschlinkert/is-even Of course that doesn't stop them from getting ~500k…
comment by oauea · 2021-07-08 · in Npm Audit: broken by design? -
Looking at the commit history, they've mostly added checks for edge cases: https://github.com/jonschlinkert/is-odd/commits/master Which is, to be fair, exactly the reason you'd use a library like this.
comment by Sebb767 · 2020-06-14 · in JavaScript Growing Pains: From 0 to 13,000 Dependencies -
…a set of potential problems, which definitely is worse). It's very obvious when you read the code - https://github.com/jonschlinkert/is-odd/blob/master/index.js . Utilities like that are a function of using a weakly typed language. "Just…
comment by onion2k · 2020-06-14 · in JavaScript Growing Pains: From 0 to 13,000 Dependencies -
…ran into and solved, and you don't have to worry about as a dev if you take it off the shelf. https://github.com/jonschlinkert/is-odd/blob/master/index.js...
comment by d_watt · 2020-04-12 · in Ride down into JavaScript dependency hell -
No he did not. https://github.com/jonschlinkert/is-odd/commit/dcc7eeff5be8f...
comment by fenollp · 2018-05-24 · in The Node.js Ecosystem Is Chaotic and Insecure -
https://github.com/jonschlinkert/is-odd/blob/master/index.js Edit: the original code, even before the float handling, was was a perf optimisation: !!(~~i & 1); Nobody wants to see that in code unless it has a name. Maybe isOdd(). Maybe we…
comment by nailer · 2018-05-24 · in The Node.js Ecosystem Is Chaotic and Insecure