Hacker GitHub

← All repos

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

Mentions per year 11 mentions · busiest year 2018 (3)
20082026
  1. …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:…
  2. 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
  3. …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…
  4. …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)
  5. …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?
  6. 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.
  7. …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…
  8. …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...
  9. ▲ 2
    Is-odd, an NPM package to check if a number is odd
    story by royjacobs · 2018-05-31 · 0 comments
  10. No he did not. https://github.com/jonschlinkert/is-odd/commit/dcc7eeff5be8f...
  11. 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…