{"id":24361832,"url":"https://github.com/xndbogdan/filesize-conversions","last_synced_at":"2025-04-10T09:55:05.550Z","repository":{"id":57750103,"uuid":"525259188","full_name":"xndbogdan/filesize-conversions","owner":"xndbogdan","description":"Filesize conversions in PHP","archived":false,"fork":false,"pushed_at":"2023-10-09T16:31:19.000Z","size":174,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T08:48:25.088Z","etag":null,"topics":["conversion","conversions","converter","file","laravel","package","php","size"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/xndbogdan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"xndbogdan"}},"created_at":"2022-08-16T06:36:59.000Z","updated_at":"2023-10-18T14:31:29.000Z","dependencies_parsed_at":"2023-02-16T09:15:46.977Z","dependency_job_id":null,"html_url":"https://github.com/xndbogdan/filesize-conversions","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xndbogdan%2Ffilesize-conversions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xndbogdan%2Ffilesize-conversions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xndbogdan%2Ffilesize-conversions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xndbogdan%2Ffilesize-conversions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xndbogdan","download_url":"https://codeload.github.com/xndbogdan/filesize-conversions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248198845,"owners_count":21063626,"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":["conversion","conversions","converter","file","laravel","package","php","size"],"created_at":"2025-01-18T22:03:11.516Z","updated_at":"2025-04-10T09:55:05.523Z","avatar_url":"https://github.com/xndbogdan.png","language":"PHP","funding_links":["https://github.com/sponsors/xndbogdan"],"categories":[],"sub_categories":[],"readme":"\n[\u003cimg src=\"https://github-ads.s3.eu-central-1.amazonaws.com/support-ukraine.svg?t=1\" /\u003e](https://supportukrainenow.org)\n\n# Filesize conversions in PHP\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/xndbogdan/filesize-conversions.svg?style=flat-square)](https://packagist.org/packages/xndbogdan/filesize-conversions)\n[![Tests](https://github.com/xndbogdan/filesize-conversions/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/xndbogdan/filesize-conversions/actions/workflows/run-tests.yml)\n[![Total Downloads](https://img.shields.io/packagist/dt/xndbogdan/filesize-conversions.svg?style=flat-square)](https://packagist.org/packages/xndbogdan/filesize-conversions)\n\nThis is a php plugin that lets you convert filesizes.\nI'm not sure why would anyone need this, but here it is!\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require xndbogdan/filesize-conversions\n```\n\n## Usage\n\n```php\nFilesizeConversions::fromBytes(pow(1024, 5))-\u003etoPetabytes();\n```\n\nYou can also use this package to get a real file's size and convert it to anything, like this:\n\n```php\nFilesizeConversions::fromFile($yourFilePath)-\u003etoKilobytesHuman();\n```\n\nMoreover, you can now do quick conversions\n```php\nFileSizeConversions::quickConvert('megabytes', 'kilobytes', 15);\n```\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Bogdan Mihai](https://github.com/xndbogdan)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxndbogdan%2Ffilesize-conversions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxndbogdan%2Ffilesize-conversions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxndbogdan%2Ffilesize-conversions/lists"}