{"id":23510844,"url":"https://github.com/danielkov/prettybits","last_synced_at":"2025-05-13T17:17:27.193Z","repository":{"id":43988587,"uuid":"242230846","full_name":"danielkov/prettybits","owner":"danielkov","description":"📟 Mini library for pretty printing bits and bytes","archived":false,"fork":false,"pushed_at":"2023-01-05T07:57:54.000Z","size":1683,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T22:02:02.628Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/danielkov.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-21T21:07:20.000Z","updated_at":"2021-01-30T00:07:17.000Z","dependencies_parsed_at":"2023-02-03T19:31:10.709Z","dependency_job_id":null,"html_url":"https://github.com/danielkov/prettybits","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":"danielkov/single-package","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielkov%2Fprettybits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielkov%2Fprettybits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielkov%2Fprettybits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielkov%2Fprettybits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielkov","download_url":"https://codeload.github.com/danielkov/prettybits/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990504,"owners_count":21995776,"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":[],"created_at":"2024-12-25T12:12:35.031Z","updated_at":"2025-05-13T17:17:27.162Z","avatar_url":"https://github.com/danielkov.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📟 prettybits\n\nMini library for pretty printing bits and bytes.\n\nThis project was bootstrapped with [this template](https://github.com/danielkov/single-package).\n\n## Get started\n\n```sh\nnpm install --save prettybits\n```\n\nor\n\n```sh\nyarn add prettybits\n```\n\n## Usage\n\nPretty print bytes:\n\n```ts\nimport { bytes } from 'prettybits';\n\nconsole.log(bytes(-11234)); // \u003e -11.2 kB\nconsole.log(bytes(0)); // \u003e 0 B\nconsole.log(bytes(11234)); // \u003e 11.2 kB\nconsole.log(bytes(3284751)); // \u003e 3.28 MB\n```\n\nPretty print bits:\n\n```ts\nimport { bits } from 'prettybits';\n\nconsole.log(bits(-11234)); // \u003e -11.2 kbit\nconsole.log(bits(0)); // \u003e 0 b\nconsole.log(bits(11234)); // \u003e 11.2 kbit\nconsole.log(bits(3284751)); // \u003e 3.28 Mbit\n```\n\n## Contributing\n\nThank you for wanting to contribute. Before you get started, [read our contribution guidelines](CONTRIBUTING.md).\n\nTo get started, fork the repository and then clone it to your machine. You will need Node JS v8+ and NPM to run the project.\n\nTo grab all the dependencies for development:\n\n```sh\nnpm install\n```\n\nRun tests in watch mode:\n\n```sh\nnpm test -w\n```\n\nOnce you're happy with your changes, use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard to create your commit messages.\n\nTo build the package, use the command:\n\n```sh\nnpm build\n```\n\nIf all seems good and tests are green, push your changes and submit a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielkov%2Fprettybits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielkov%2Fprettybits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielkov%2Fprettybits/lists"}