From 988bc7fe4d7c7669f46755239a1d09100fea025a Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Wed, 31 Oct 2012 16:42:22 -0700 Subject: [PATCH] JS: Add Currency.json_rewrite(). --- js/amount.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/amount.js b/js/amount.js index a9e6e839d8..b5c542288e 100644 --- a/js/amount.js +++ b/js/amount.js @@ -232,6 +232,11 @@ var Currency = function () { this.value = NaN; } +// Given "USD" return the json. +Currency.json_rewrite = function(j) { + return Currency.from_json(j).to_json(); +}; + Currency.from_json = function (j) { return (new Currency()).parse_json(j); };