mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
JS: Add Currency.json_rewrite().
This commit is contained in:
committed by
Stefan Thomas
parent
1db7da9f63
commit
1a1f4db2c2
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user