moved l-a-s in here
This commit is contained in:
parent
1e3e55e362
commit
836ab07776
18 changed files with 3946 additions and 281 deletions
24
tools/currencies.js
Normal file
24
tools/currencies.js
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
// Pull latest from: http://www.currency-iso.org/en/home/tables/table-a1.html
|
||||
// Convert to JSON at: http://www.csvjson.com/csv2json
|
||||
|
||||
const R = require('ramda')
|
||||
const currencies = require('../currencies.json')
|
||||
|
||||
function goodCurrency (currency) {
|
||||
const code = currency.code
|
||||
return code.length === 3 && code[0] !== 'X'
|
||||
}
|
||||
|
||||
function simplify (currency) {
|
||||
return {
|
||||
code: currency['Alphabetic Code'],
|
||||
display: currency['Currency']
|
||||
}
|
||||
}
|
||||
|
||||
function toElmItem (currency) {
|
||||
return `{ code = "${currency.code}"
|
||||
, display = "${currency.display}"
|
||||
, searchWords = []
|
||||
}`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue