trans-money-to-text

0.0.3 • Public • Published

convert-money-to-text

Convert money (number) to text

Table of Contents

Why?

I found a solution to convert money into text characters

Installation

$ npm i trans-money-to-text -S

or

$ yarn add trans-money-to-text

Functions

Take a look into the usage section for a detailed example.

convertMoneyToText

Note: you can also use the default export.

This function converts money to text value (string).

Syntax

Returns a number or NaN.

const number = convertMoneyToText(value);
Parameters
  • value: number

Usage

An example how to use it.

const { convertMoneyToText } = require('trans-money-to-text') // name export
const convertMoneyToText = require('convert-string-to-number'); // default export

const text = convertMoneyToText('2000'); // => 2 nghìn đồng

License

MIT © Lukas Aichbauer

Readme

Keywords

Package Sidebar

Install

npm i trans-money-to-text

Weekly Downloads

3

Version

0.0.3

License

ISC

Unpacked Size

5.19 kB

Total Files

3

Last publish

Collaborators

  • huynhhuuhien