{"id":19388950,"url":"https://github.com/james2doyle/lit-pretty-bytes","last_synced_at":"2025-12-31T14:12:24.887Z","repository":{"id":28534187,"uuid":"32051145","full_name":"james2doyle/lit-pretty-bytes","owner":"james2doyle","description":"Lit package for converting bytes to a human readable string: 1337 → 1.34 kB","archived":false,"fork":false,"pushed_at":"2015-11-06T22:59:54.000Z","size":156,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-07T08:49:11.724Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/james2doyle.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":"2015-03-12T01:46:27.000Z","updated_at":"2015-11-08T16:35:02.000Z","dependencies_parsed_at":"2022-08-30T09:22:38.673Z","dependency_job_id":null,"html_url":"https://github.com/james2doyle/lit-pretty-bytes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james2doyle%2Flit-pretty-bytes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james2doyle%2Flit-pretty-bytes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james2doyle%2Flit-pretty-bytes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/james2doyle%2Flit-pretty-bytes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/james2doyle","download_url":"https://codeload.github.com/james2doyle/lit-pretty-bytes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240549434,"owners_count":19819131,"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-11-10T10:14:10.794Z","updated_at":"2025-12-31T14:12:24.846Z","avatar_url":"https://github.com/james2doyle.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"Pretty Bytes\n=============\n\n[sindresorhus/pretty-bytes npm package](https://github.com/sindresorhus/pretty-bytes)\n\n\u003e Convert bytes to a human readable string: `1337` → `1.34 kB`\n\nUseful for displaying file sizes for humans.\n\n---\n\n*Note that it uses base-10 (eg. kilobyte). [Read about the difference between kilobyte and kibibyte.](http://pacoup.com/2009/05/26/kb-kb-kib-whats-up-with-that/)*\n\n## Install\n\n```sh\n$ lit install james2doyle/pretty-bytes\n```\n\n## Usage\n\n```lua\nlocal prettyBytes = require('pretty-bytes')\n\nprint(prettyBytes(1337)) -- prints 1.34kB\n\n-- a byte \u003c 1 example\nprint(prettyBytes(0.1337)) -- prints 0.1337 B\n\n-- passing true as last argument adds a single space between number and size\nprint(prettyBytes(1337, true)) -- prints 1.34 kB\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjames2doyle%2Flit-pretty-bytes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjames2doyle%2Flit-pretty-bytes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjames2doyle%2Flit-pretty-bytes/lists"}