Currency Code to locale JS
<p>Humour me here, but I have a trivial task of taking a number input, and format it to a currency code.</p>

<p>IE:</p>

<pre><code>var value = 1000;
value.toLocaleString('en-AU, {
    style: 'currency',
    currency: 'AUD;,
    minimumFractionDigits: 2
});
// A$1,000.00
</code></pre>

<p>Which works - only problem is, this sits in a function, where I pass the value and the currency.. </p>

<blockquote>
  <p>function(value, currency)</p>
</blockquote>

<p>Which now I have to maintain a list of currency to locale mappings. Is there a quick and lightweight way to format a number to currency. Im quite happy to sent a locale instead of the currency. Either way, I don't want to maintain two lists.</p>