Coder Social home page Coder Social logo

wordifyfa's Introduction

Persian Wordifier converts simple numbers to words. for example you can use this:

var a = 235000;
var b = wordifyfa(a);
console.log(b); // دویست و سی و پنج هزار
var c = wordifyRials(a); // دویست و سی و پنج هزار ریال
var d = wordifyRialsInTomans(a); // بیست و سه هزار و پانصد تومان

#installation: 1- add this line of code in your html.

<script src="wordifyfa.js"></script>

or if you using Node.js

var wordifyfa = require('./wordifyfa.js');

2- use the code.

    var a = 93390;
    var b = wordifyfa(a); // نود و سه هزار و سیصد و نود

#functions: ##1 converts number to words

	wordifyfa(number) 
	wordifyfa(43); // چهل و سه

or in Node.js :

	var a = require('./wordifyfa.js');
	a.wordifyfa(number);

##2 converts number to words with Rial sign

	wordifyRials(number) 
	wordifyRials(400); // چهارصد ریال

or in Node :

	var a = require('./wordifyfa.js');
	a.worifyfaRials(number);

##3 converts number that is in Rials to Tomans and wordifies it

	wordifyRialsInTomans(number) 
	wordifyRialsInTomans(5000); // پانصد تومان

or in Node :

	var a = require('./wordifyfa.js');
	a.wordifyRialsInTomans(number);

more info:

this code now supports max to 999,999,999,999,999. is it sufficient?

##Main Contributors

wordifyfa's People

Contributors

salmanaa avatar mbehtemam avatar sadeghxmen avatar

Stargazers

Raana avatar

Watchers

James Cloos avatar

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.