npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dimaskiddo/angka-terbilang-nodejs

v1.0.9

Published

Angka Terbilang in NodeJS for Converting Decimal to an Indonesian Wording format

Downloads

111

Readme

NodeJS package for Converting Decimal to an Indonesian Wording format

This package will help you to convert a decimal to an Indonesian wording format, for example 123 will be converted to seratus dua puluh tiga. This package was inspired from develoka/angka-terbilang-js by Develoka Team.

Getting Started

These instructions will get you this package can be used in your project.

Prerequisites

Prequisites Packages:

  • NodeJS (NodeJS Programming Language)

Using This Package

Below is the instructions to use this package:

  • Install this package to your project
npm install --save @dimaskiddo/angka-terbilang-nodejs
  • Import this package to your code
...
const angka = require('@dimaskiddo/angka-terbilang-nodejs')
...
  • Use ToTerbilang function to convert your decimal string
...
console.log(angka.toTerbilang('123'))
...

Example Usage of Package

Below is the simple example source code:

const angka = require('@dimaskiddo/angka-terbilang-nodejs')
console.log(angka.toTerbilang('123'))

Example Usage for in Browser Javascript

Below is the example of using for in Browser Javascript:

<script src="https://unpkg.com/@dimaskiddo/angka-terbilang-nodejs@latest/index.min.js"></script>
console.log(angka.toTerbilang('123'))

Development

Editing

  • Clone this repository in to your local computer
git clone -b master https://github.com/dimaskiddo/angka-terbilang-nodejs.git
  • Edit index.js file in the root of cloned repository directory

Running The Tests

To run the test you can run the following command

npm run test

Rebuilding

After editing you also need to rebuild the minified and browser javascript version by running the following command

npm run minified

Or you can run the full build with the test with following command

npm run build

Benchmarking

Benchmark is done with four (4) other packages that has the same function. It's done by converting a decimal number with units hundreds of thousands, hundreds of millions, hundreds of billions, hundreds of trillions.

Benchmark tools are provided by Develoka Team

Benchmark Results

Benchmark with NodeJS 10.18.0 @ November 8th 2020 14:55 | Package | Angka Ratusan Ribu | Angka Ratusan Juta | Angka Ratusan Milyar | Angka Ratusan Triliun | | ---------------------------------------- | ------------------ | ------------------ | -------------------- | --------------------- | | @dimaskiddo/angka-terbilang-nodejs | 2,836,662 ops/sec | 2,029,144 ops/sec | 1,386,470 ops/sec | 1,095,911 ops/sec | | @develoka/angka-terbilang-js | 2,385,251 ops/sec | 1,832,777 ops/sec | 1,371,450 ops/sec | 1,085,423 ops/sec | | dikyarga/angka-menjadi-terbilang | 113,920 ops/sec | 97,849 ops/sec | 85,656 ops/sec | 75,029 ops/sec | | BosNaufal/terbilang-js | 194,925 ops/sec | 133,416 ops/sec | 76,289 ops/sec | 47,955 ops/sec | | rimara14/terbilang | 532,279 ops/sec | 312,694 ops/sec | 188,072 ops/sec | 2,504,031 ops/sec |

Benchmark Device

Operating System: MacOS High Sierra 10.13.6
CPU Model: Intel(R) Core(TM) i5-5250U CPU @ 1.60GHz
CPU Core: 2 Core with Hypterthreading (4 vCPU)
RAM: 8 GB
Disk Type: SSD

Benchmark Notes

The result might be different depending on the undelying software or hardware that used to run benchmark

Built With

  • NodeJS - NodeJS Programming Languange

Authors

  • Dimas Restu Hidayanto - Initial Work - DimasKiddo
  • R. M. Dwi Rizki - Fungsional Test and Benchmarking - rmdwirizki

See also the list of contributors who participated in this project