{"id":30586069,"url":"https://github.com/roginvs/is-even","last_synced_at":"2025-10-10T01:14:49.325Z","repository":{"id":311192544,"uuid":"1042829023","full_name":"roginvs/is-even","owner":"roginvs","description":"isEven function in native nodejs bindings using machine code","archived":false,"fork":false,"pushed_at":"2025-08-22T18:28:55.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-22T19:05:27.794Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roginvs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-22T16:37:36.000Z","updated_at":"2025-08-22T18:28:59.000Z","dependencies_parsed_at":"2025-08-22T19:05:30.535Z","dependency_job_id":"c7b2a9b1-00c8-42dc-8afe-b47fb1fe556b","html_url":"https://github.com/roginvs/is-even","commit_stats":null,"previous_names":["roginvs/is-even"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/roginvs/is-even","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roginvs%2Fis-even","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roginvs%2Fis-even/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roginvs%2Fis-even/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roginvs%2Fis-even/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roginvs","download_url":"https://codeload.github.com/roginvs/is-even/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roginvs%2Fis-even/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002404,"owners_count":26083373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-29T11:38:36.842Z","updated_at":"2025-10-10T01:14:49.320Z","avatar_url":"https://github.com/roginvs.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# is-even\n\nA deliberately inefficient utility to check if a number is even.\n\nIt literally contains [4 billion if statements](https://andreasjhkarlsson.github.io/jekyll/update/2023/12/27/4-billion-if-statements.html), one for every possible 32-bit unsigned integer.\n\n## Features\n\n- Works on macOS, Windows, and Linux\n- Supports x64 and arm64\n- Handles 32-bit unsigned numbers (0 to 0xFFFFFFFF). Passing anything else is undefined behavior\n- Complexity: `O(n)`. Small numbers return fast, large ones can take 30–40s\n- The 4 billion statements are generated on first import, not downloaded\n- Generated code lives in `node_modules` (~45 GB on amd64)\n- Uses Node.js native bindings to execute assembly\n- No external dependencies\n\n## Installation\n\n```sh\nnpm install https://github.com/roginvs/is-even\n```\n\n## Usage\n\n```js\nconst isEven = require(\"is-even\");\n\nconsole.log(isEven(4)); // true\nconsole.log(isEven(7)); // false\n```\n\n## TODO\n\n- Add support for risc-v\n- Add `bun` support\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froginvs%2Fis-even","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froginvs%2Fis-even","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froginvs%2Fis-even/lists"}