millify-indo

1.1.3 • Public • Published

millify-indo

Convert long numbers into a human-readable format, e.g. 25000 to '25Rb'

This script originally created by Izolate, Customized by Workaja using Indonesian common Postfixes.

Supported Sizing

  • Money (we call it: uang and duit)
  • Weight (we use basic weight on: gram/g and miligram/mg)
  • Length (we use basic length on: milimeter/mm, centimeter/cm and meter/m )
  • Storage (we call it: storage, harddisk, penyimpanan and hdd)

Installation

npm i millify-indo

Usage

millify-indo(@angka, @tingkat, @satuan)

  • First parameter is the number

  • Second parameter is the type like uang, duit, gram, penyimpanan or else (look above).

import millify from 'millify-indo'

millify(2500, 3, 'uang')
// 2.5Ribu

millify(1250000, 6, 'hdd')
// 1.25Megabyte

millify(2000000000)
// 2Milyar

/millify-indo/

    Package Sidebar

    Install

    npm i millify-indo

    Weekly Downloads

    2

    Version

    1.1.3

    License

    MIT

    Unpacked Size

    6.2 kB

    Total Files

    9

    Last publish

    Collaborators

    • rixki