{"id":25015512,"url":"https://github.com/patrik-csak/bb26","last_synced_at":"2025-08-09T22:06:56.101Z","repository":{"id":34932525,"uuid":"192216143","full_name":"patrik-csak/BB26","owner":"patrik-csak","description":"🔠 Convert between numbers and base-26 spreadsheet column letters","archived":false,"fork":false,"pushed_at":"2025-07-26T23:59:21.000Z","size":1364,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-09T02:26:01.436Z","etag":null,"topics":["base-26","bijective-base-26","hexavigesimal","spreadsheet"],"latest_commit_sha":null,"homepage":"https://npmjs.com/bb26","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patrik-csak.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":".github/funding.yml","license":"license.txt","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},"funding":{"buy_me_a_coffee":"patrikcsak"}},"created_at":"2019-06-16T17:00:40.000Z","updated_at":"2025-07-26T23:59:11.000Z","dependencies_parsed_at":"2024-03-14T20:24:58.275Z","dependency_job_id":"2882d80b-54b2-4978-9cbb-89f251ab798c","html_url":"https://github.com/patrik-csak/BB26","commit_stats":{"total_commits":124,"total_committers":4,"mean_commits":31.0,"dds":0.564516129032258,"last_synced_commit":"185936f2b5068fca9e781dde587408970807be51"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/patrik-csak/BB26","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrik-csak%2FBB26","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrik-csak%2FBB26/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrik-csak%2FBB26/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrik-csak%2FBB26/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrik-csak","download_url":"https://codeload.github.com/patrik-csak/BB26/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrik-csak%2FBB26/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269644854,"owners_count":24452632,"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-08-09T02:00:10.424Z","response_time":111,"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":["base-26","bijective-base-26","hexavigesimal","spreadsheet"],"created_at":"2025-02-05T08:30:17.941Z","updated_at":"2025-08-09T22:06:56.085Z","avatar_url":"https://github.com/patrik-csak.png","language":"TypeScript","funding_links":["https://buymeacoffee.com/patrikcsak"],"categories":[],"sub_categories":[],"readme":"# BB26\n\nBB26 is a JavaScript library for working with [bijective base-26](https://en.wikipedia.org/wiki/Bijective_numeration#The_bijective_base-26_system) (BB26) numbers.\n\n## What is bijective base-26 numeration?\n\nYou’re probably familiar with BB26 numeration. It’s used for spreadsheet columns, license plate serials, and (probably?) more.\n\nHere’s an example of decimal (base-10) numbers (the numbers you use every day to count things) compared to their corresponding BB26 numbers:\n\n```\nDecimal: | 1 | 2 | 3 | … | 24 | 25 | 26 | 27 | 28 | 29 | …\n   BB26: | A | B | C | … |  X |  Y |  Z | AA | AB | AC | …\n```\n\n## Install\n\n```shell\nnpm install bb26\n```\n\n## API\n\n### `increment()`\n\n```typescript\nfunction increment(string: string): string;\n```\n\nIncrements a bijective base-26 string by one numeral.\n\n```javascript\nimport {increment} from 'bb26';\n\nincrement('A'); // 'B'\nincrement('Z'); // 'AA'\nincrement('AA'); // 'AB'\n```\n\n### `random()`\n\n```typescript\nfunction random(upper: string): string;\nfunction random(lower: string, upper: string): string;\n```\n\nProduces a random string between the inclusive `lower` and `upper` bounds. If only one argument is provided, a string between `'A'` and the given string is returned.\n\n```javascript\nimport {random} from 'bb26';\n\nrandom('AAA'); // 'NE'\nrandom('AAA', 'AAAA'); // 'KXZ'\n```\n\n### `range()`\n\n```typescript\nfunction range(end: string): string[];\nfunction range(start: string, end: string): string[];\n```\n\nCreates an array of bijective base-26 numerals progressing from `start` up to, but not including, `end`. If `end` is not specified, it's set to `start` with `start` then set to `'A'`.\n\n```javascript\nimport {range} from 'bb26';\n\nrange('B'); // ['A']\nrange('C'); // ['A', 'B']\nrange('B', 'C'); // ['B']\nrange('B', 'D'); // ['B', 'C']\nrange('Z', 'AC'); // ['Z', 'AA', 'AB']\n```\n\n### `toBb26()`\n\n```typescript\nfunction toBb26(number: number): string;\n```\n\nConverts a decimal number to a bijective base-26 string.\n\n```javascript\nimport {toBb26} from 'bb26';\n\ntoBb26(1); // 'A'\ntoBb26(2); // 'B'\ntoBb26(26); // 'Z'\ntoBb26(27); // 'AA'\ntoBb26(28); // 'AB'\n```\n\n### `toDecimal()`\n\n```typescript\nfunction toDecimal(string: string): number;\n```\n\nConverts a bijective base-26 string to a decimal number.\n\n```javascript\nimport {toDecimal} from 'bb26';\n\ntoDecimal('A'); // 1\ntoDecimal('B'); // 2\ntoDecimal('Z'); // 26\ntoDecimal('AA'); // 27\ntoDecimal('AB'); // 28\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrik-csak%2Fbb26","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrik-csak%2Fbb26","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrik-csak%2Fbb26/lists"}