Number and currency formatter in Indonesia numbering system based on "Pedoman Umum Ejaan Bahasa Indonesia" (PUEBI)
npm i indonesia-numbering-formatter
import React from "react";
import ReactDOM from "react-dom";
import idx from "indonesia-numbering-formatter";
In JSX
class App extends React.Component {
render() {
return (
<div className="App">
<p> {idx.format(2000)} </p>
<p> {idx.formatCurrency(10000)} </p>
<p> {idx.unformat("1.0,2") * 2}</p>
</div>
);
}
}
export default App