Download the PHP package sikandarmoyaldev/indian-amount-formatter without Composer

On this page you can find all versions of the php package sikandarmoyaldev/indian-amount-formatter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package indian-amount-formatter

Indian Amount Formatter

A high-performance, dual-language utility package for formatting Indian currency amounts, percentages, and ranges.

This monorepo contains native implementations for both TypeScript and PHP, guaranteed to behave identically via shared test fixtures.

๐Ÿ“š Packages

Package Language Documentation
packages/ts TypeScript / Node.js View Docs
packages/php PHP View Docs

โœจ Features

๐Ÿ“ฆ Installation

TypeScript / Node.js

PHP

๐Ÿ“– Usage

TypeScript

PHP

๐Ÿ’ก API Reference

Method Description Example Output
formatAmount(amount, prefix?, options?) Formats a numeric amount into Indian short-form. โ‚น2 Lakh, โ‚น4.99K
formatPercentage(value, options?) Formats a percentage, removing trailing zeros. 3.5%, 10%
formatAmountRange(min, max, prefix?, options?) Formats a range of amounts. โ‚น1 Lakh - โ‚น5 Lakh
formatAmountWithActual(amount, prefix?, options?) Formats amount showing both short and actual values. โ‚น1.4 Lakh (โ‚น1,40,000)

Note: You can also use the InrFormatter class to configure options like round: true or round: false.

๐Ÿ› ๏ธ Development

This project uses a monorepo structure managed by pnpm (for TypeScript) and composer (for PHP).

Prerequisites

Setup

๐Ÿงช Running Tests

๐ŸŽจ Formatting Code

We use Prettier globally to format TS, JS, JSON, MD, and PHP files.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


All versions of indian-amount-formatter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sikandarmoyaldev/indian-amount-formatter contains the following files

Loading the files please wait ...