Giter VIP home page Giter VIP logo

rupiah_ts's Introduction

Rupiah

Indonesian Currency (format number to indonesian currency) based on Standart PUEBI format

Installation in Deno

import Rupiah from 'https://deno.land/x/rupiah_ts/rupiah.ts'

let rupiah = new Rupiah(350000);
console.log(rupiah.format);
// result Rp350.000,00

Terbilang

You can also make number to terbilang (words version of rupiah)

import Rupiah from 'https://deno.land/x/rupiah_ts/rupiah.ts'

let rupiah = new Rupiah(350000);
console.log(rupiah.terbilang);
// result Tiga Ratus Lima Puluh Ribu Rupiah

Set Prefix and Suffix

Default prefix is configured as Rp and suffix is configured as ,00 you can set custom prefix and suffix with this following API

import Rupiah from 'https://deno.land/x/rupiah/rupiah.ts'

let rupiah = new Rupiah(350000);
rupiah.setPrefix = "RP";
rupiah.setSuffix = ",-";
console.log(rupiah.format);
// result Rp350.000,-

Separator

Default separator is configured as . you can set custom separator with this following API

import Rupiah from 'https://deno.land/x/rupiah/rupiah.ts'

let rupiah = new Rupiah(350000);
rupiah.setSeparator = "-";
console.log(rupiah.format);
// result 350-000

Development

This repo is in early development stage. PRs is welcomed.

Test

Just run from cli

deno test

Feature Roadmap

  • Rupiah Format
  • Terbilang

Miscellaneous

rupiah_ts's People

Contributors

andriawan avatar isfaaghyth avatar

Stargazers

 avatar

Watchers

 avatar

rupiah_ts's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.