Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/serhiicho/short-number

Lightweight package that shortens given number by taking digits and adding K, M, B or T after them. For example 1234 will be formatted to 1K and 20244023 to 20M. Package supports multiple languages
https://github.com/serhiicho/short-number

composer-package datetime package packagist php

Last synced: 2 months ago
JSON representation

Lightweight package that shortens given number by taking digits and adding K, M, B or T after them. For example 1234 will be formatted to 1K and 20244023 to 20M. Package supports multiple languages

Awesome Lists containing this project

README

        

# Short Number

[![Short number](https://github.com/SerhiiCho/short-number/actions/workflows/php.yml/badge.svg)](https://github.com/SerhiiCho/short-number/actions/workflows/php.yml)
[![Total Downloads](https://poser.pugx.org/serhii/short-number/downloads)](https://packagist.org/packages/serhii/short-number)
[![License](https://poser.pugx.org/serhii/short-number/license)](https://packagist.org/packages/serhii/short-number)

Lightweight package shortens given number to a short representation of it. For example **1234** will be formatted to **1k** and **20244023** to **20m**. Package supports multiple languages, the default it's set to English.

### Follow the [full documentation](https://serhiicho.github.io/short-number-docs/) for this package

## 🚀 Quick Start

```bash
composer require serhii/short-number
```

## 📄 License

The Short Number project is licensed under the [MIT License](https://github.com/SerhiiCho/short-number/blob/main/LICENSE.md)