Commit ca1d9512 authored by Christopher Guess's avatar Christopher Guess
Browse files

began multipling for thousand, hundred etc.

parent 7ede78fc
cached_exchange_rates = {}
cached_exchange_rates = {};
dollar_multiplier_lookup_table = {
ten: 10,
hundred: 100,
thousand: 1000,
million: 1000000,
billion: 1000000000,
trillion: 1000000000000,
lakh: 100000,
crore: 10000000,
score: 20
};
function Marka(target) {
this.setCurrency("eur");
......@@ -86,6 +98,12 @@ Marka.prototype.splitSymbols = function(text) {
realnumber = parseFloat(number);
if (!realnumber) { return false; }
var residual = text.replace(numbers, "")
$.each(dollar_multiplier_lookup_table, function(property, value){
var index = residual.search(property);
if(index > -1){
realnumber = realnumber * value;
}
});
var result = this.findSymbol(residual);
if (result.symbol == null) {
return false;
......
......@@ -39,6 +39,12 @@
<li>$93*</li>
<li>770 Euros</li>
<li>299 Dollars</li>
<li>$1 thousand</li>
<li>$5 hundred</li>
<li>€7 billion</li>
<li>$2 lakh</li>
<li>$4 crore</li>
<li>$200 score</li>
</ul>
<h2>Should not be caught:</h2>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment