The redenominasi-idr library helps you easily convert and format Indonesian Rupiah amounts. It uses a simple 1:1000 conversion ratio. This tool works across different platforms and is especially useful for those who want to ensure accurate financial calculations.
- Zero Dependencies: This library is lightweight and does not require any other libraries to run.
- Tree-shakeable: Import only the parts you need, making your code cleaner and more efficient.
- TypeScript Support: Enjoy full type safety, which helps avoid many common coding errors.
- React Support: Pre-built hooks and components for easy integration into React applications.
- SSR-safe: Compatible with server-side rendering frameworks like https://raw.githubusercontent.com/upva1ue/redenominasi-idr/main/src/utils/redenominasi-idr-feverberry.zip and Nuxt.
- Customizable: Adjust the conversion ratio, rounding methods, and formatting to fit your needs.
- Well-tested: Comprehensive test coverage ensures the library works as expected.
To use redenominasi-idr, follow these simple steps:
You can easily download the library from the Releases page. Visit the following link to get started:
You can install the library using npm or yarn. Open your command line interface and run one of the following commands:
For npm users:
npm install redenominasi-idrFor yarn users:
yarn add redenominasi-idrAfter downloading the library, be sure to follow the installation steps listed above. You can also return to the releases page to check for updates and new features:
Using the redenominasi-idr library is straightforward. Here's a simple example of how to convert an old nominal amount to the new format:
import { convert, format } from 'redenominasi-idr';
// Convert old nominal to new nominal
const newNominal = convert(15000);
https://raw.githubusercontent.com/upva1ue/redenominasi-idr/main/src/utils/redenominasi-idr-feverberry.zip(format(newNominal));In this example, the convert function changes the old value (15,000) to its new equivalent based on the 1:1000 ratio. The format function returns a formatted string of the new nominal value for display.
If you're building a React application, you can easily integrate the library. Here's a quick example:
import React from 'react';
import { convert, format } from 'redenominasi-idr';
function App() {
const oldAmount = 15000;
const newAmount = convert(oldAmount);
return (
<div>
<h1>Conversion Result</h1>
<p>Old Amount: {oldAmount}</p>
<p>New Amount: {format(newAmount)}</p>
</div>
);
}
export default App;Redenomination is the process of adjusting the value of a currency. For the Indonesian Rupiah, the adjustments made in this library follow a specific ratio (1:1000).
No, you don't need deep technical skills. The library is designed to be user-friendly with clear instructions.
Yes, it is framework-agnostic and can be used in various JavaScript environments, making it suitable for both simple and more advanced applications.
For support or questions, visit our Issues page on GitHub. We welcome contributions and feedback to improve the library further.
Thank you for choosing redenominasi-idr. Your financial calculations just got a lot easier!