@flowio/reference-javascript
v1.1.54
Published
JavaScript Reference Libaray
Downloads
11
Keywords
Readme
reference-javascript
The JavaScript lib for accessing the data provided by the reference api.
Provides static data for countries, currencies, languages and timezones.
Usage
Can be imported one of two ways:
import { countries } from '@flowio/reference-javascript';
or
import reference from '@flowio/reference-javascript';
// use reference.countries
For ES5:
var reference = require('@flowio/reference-javascript').default;
API
Countries
find(q)
q
- query - can be one of:- iso_3166_2 representation of the country, i.e, US
- iso_3166_3 representation of the country, i.e, USA
- the name of the country, i.e, United States
Currencies
find(q)
q
- query - can be one of:- iso_4217_3 representation of the currency, i.e, USD
- the name of the currency, i.e, US Dollar
Languages
find(q)
q
- query - can be one of:- iso_639_2 representation of the currency, i.e, en
- the name of the currency, i.e, English
Timezones
find(q)
q
- query - can be one of:- offset of the timezone, i.e,
-240
for Eastern Daylight Time - the name of the currency, i.e, America/New_York
- offset of the timezone, i.e,