{"id":18268364,"url":"https://github.com/pot-pourri/bit","last_synced_at":"2026-06-06T00:31:22.352Z","repository":{"id":20457374,"uuid":"23734597","full_name":"pot-pourri/bit","owner":"pot-pourri","description":":two: Bit twiddling hacks for JavaScript","archived":false,"fork":false,"pushed_at":"2021-04-26T14:08:46.000Z","size":116,"stargazers_count":0,"open_issues_count":59,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-26T18:16:45.739Z","etag":null,"topics":["agpl","bit-algorithms","bit-manipulation","bit-tricks","bit-twiddling-hacks","javascript"],"latest_commit_sha":null,"homepage":"https://aureooms.github.io/js-bit","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pot-pourri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-06T12:59:48.000Z","updated_at":"2022-11-01T08:05:51.000Z","dependencies_parsed_at":"2022-07-31T20:38:02.740Z","dependency_job_id":null,"html_url":"https://github.com/pot-pourri/bit","commit_stats":null,"previous_names":["aureooms/js-bit"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/pot-pourri/bit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pot-pourri%2Fbit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pot-pourri%2Fbit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pot-pourri%2Fbit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pot-pourri%2Fbit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pot-pourri","download_url":"https://codeload.github.com/pot-pourri/bit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pot-pourri%2Fbit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33965591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"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":["agpl","bit-algorithms","bit-manipulation","bit-tricks","bit-twiddling-hacks","javascript"],"created_at":"2024-11-05T11:31:09.376Z","updated_at":"2026-06-06T00:31:22.336Z","avatar_url":"https://github.com/pot-pourri.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[js-bit](http://make-github-pseudonymous-again.github.io/js-bit)\n==\n\nBit twiddling hacks code bricks for JavaScript.\n\n[![License](https://img.shields.io/github/license/make-github-pseudonymous-again/js-bit.svg?style=flat)](https://raw.githubusercontent.com/make-github-pseudonymous-again/js-bit/master/LICENSE)\n[![NPM version](https://img.shields.io/npm/v/@aureooms/js-bit.svg?style=flat)](https://www.npmjs.org/package/@aureooms/js-bit)\n[![Bower version](https://img.shields.io/bower/v/@aureooms/js-bit.svg?style=flat)](http://bower.io/search/?q=@aureooms/js-bit)\n[![Build Status](https://img.shields.io/travis/make-github-pseudonymous-again/js-bit.svg?style=flat)](https://travis-ci.org/make-github-pseudonymous-again/js-bit)\n[![Coverage Status](https://img.shields.io/coveralls/make-github-pseudonymous-again/js-bit.svg?style=flat)](https://coveralls.io/r/make-github-pseudonymous-again/js-bit)\n[![Dependencies Status](https://img.shields.io/david/make-github-pseudonymous-again/js-bit.svg?style=flat)](https://david-dm.org/make-github-pseudonymous-again/js-bit#info=dependencies)\n[![devDependencies Status](https://img.shields.io/david/dev/make-github-pseudonymous-again/js-bit.svg?style=flat)](https://david-dm.org/make-github-pseudonymous-again/js-bit#info=devDependencies)\n[![Code Climate](https://img.shields.io/codeclimate/github/make-github-pseudonymous-again/js-bit.svg?style=flat)](https://codeclimate.com/github/make-github-pseudonymous-again/js-bit)\n[![NPM downloads per month](https://img.shields.io/npm/dm/@aureooms/js-bit.svg?style=flat)](https://www.npmjs.org/package/@aureooms/js-bit)\n[![GitHub issues](https://img.shields.io/github/issues/make-github-pseudonymous-again/js-bit.svg?style=flat)](https://github.com/make-github-pseudonymous-again/js-bit/issues)\n[![Inline docs](http://inch-ci.org/github/make-github-pseudonymous-again/js-bit.svg?branch=master\u0026style=shields)](http://inch-ci.org/github/make-github-pseudonymous-again/js-bit)\n\nCan be managed through [duo](https://github.com/duojs/duo),\n[component](https://github.com/componentjs/component),\n[bower](https://github.com/bower/bower), or\n[npm](https://github.com/npm/npm).\n\n```js\nlet bit = require( \"@aureooms/js-bit\" ) ;\n```\n\nExample usage:\n\n```js\n/* Compute the sign of an integer */\nbit.sign(  0  ) ; // 0\nbit.sign( -67 ) ; // -1\nbit.sign( 432 ) ; // +1\n\n/* Compute the lexicographically next bit permutation */\nbit.next( 0b00101001 ) ; // 0b00101010\n```\n\nReferences:\n\n - https://graphics.stanford.edu/~seander/bithacks.html\n - https://github.com/boothj5/bit-twiddling/blob/master/basic.c\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpot-pourri%2Fbit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpot-pourri%2Fbit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpot-pourri%2Fbit/lists"}