{"id":23249068,"url":"https://github.com/argeento/bit-crusher","last_synced_at":"2025-04-06T01:21:17.699Z","repository":{"id":141446368,"uuid":"293787850","full_name":"Argeento/bit-crusher","owner":"Argeento","description":"Javascript dictionary encoder","archived":false,"fork":false,"pushed_at":"2020-10-10T01:11:51.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T01:04:47.156Z","etag":null,"topics":["codegolf","js1k","jscrush"],"latest_commit_sha":null,"homepage":"","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/Argeento.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-08T11:19:57.000Z","updated_at":"2021-08-14T10:49:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"28555556-4ab1-4dff-9c23-09daef156767","html_url":"https://github.com/Argeento/bit-crusher","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.1428571428571429,"last_synced_commit":"ba084b138ebfac238351fe477c79c4ef224ec88f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Argeento%2Fbit-crusher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Argeento%2Fbit-crusher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Argeento%2Fbit-crusher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Argeento%2Fbit-crusher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Argeento","download_url":"https://codeload.github.com/Argeento/bit-crusher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247421136,"owners_count":20936236,"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","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":["codegolf","js1k","jscrush"],"created_at":"2024-12-19T08:16:48.831Z","updated_at":"2025-04-06T01:21:17.682Z","avatar_url":"https://github.com/Argeento.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bit crusher\nJavascript URL-friendly [dictionary encoder](https://en.wikipedia.org/wiki/Dictionary_coder) created to **code-golfing** competition\n\n## Example crush\n\nBefore: **253** chars\n\n```js\nconsole.log(`99 bottles of beer on the wall, 99 bottles of beer.\nTake one down and pass it around, 98 bottles of beer on the wall.\n98 bottles of beer on the wall, 98 bottles of beer.\nTake one down and pass it around, 97 bottles of beer on the wall.`)\n```\n\nAfter: **167** chars\n```js\nO=`console.log(\\`99jv9m8j.\n98jv8m7j.\\`)jq on the wallmq.\nTake one down and pass it aroundvq bottles of beerv, 9`;for(o of'vqmj')with(O.split(o))O=join(pop());eval(O)\n```\n\n## Why URL-friendly?\n**Bit crusher** does not use special URL character, so with a little modification you can put your script to QR-code!\n\n### Try it out!\n\n![image](https://user-images.githubusercontent.com/13007891/92503018-f2769180-f200-11ea-9327-4342ea0afeee.png)\n```\ndata:text/html,\u003cscript\u003eO=`alert(\\`99jv9m8j.%0A\n98jv8m7j.\\`)jq on the wallmq.%0A\nTake one down and pass it aroundvq bottles of beerv, 9`;for(o of'vqmj')with(O.split(o))O=join(pop());eval(O)\u003c/script\u003e\n```\n\nCopy scaned text to browser address bar and see the result!\n\n## Instalation\n```\nnpm i bit-crush\n```\n\n## Usage\n\nNode:\n```js\nconst bitCrush = require('bit-crush')\n\nconst code = `console.log(\\`99 bottles of beer on the wall, 99 bottles of beer.\nTake one down and pass it around, 98 bottles of beer on the wall.\n98 bottles of beer on the wall, 98 bottles of beer.\nTake one down and pass it around, 97 bottles of beer on the wall.\\`)`\n\nconst crushed = bitCrush(code)\n\nconsole.log(crushed)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fargeento%2Fbit-crusher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fargeento%2Fbit-crusher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fargeento%2Fbit-crusher/lists"}