@xrates/usd-sek
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

Exchange Rates: USD - SEK

Historical exchange rates for the USD/SEK pair.

Installation

npm install --save @xrates/usd-sek

Usage

const usdToSek = require('@xrates/usd-sek')

console.log(usdToSek.lookup('2014-10-15'))
//=> 7.2696

API

lookup(date: string | Date): number

Get the exchange rate for the specified date. The return value is a number that fits the description "1 USD = ? SEK".

If the specific date requested is missing (e.g. due to bank holiday) the closest available date will be used.

If the specified date falls outside the span of the provided data, a RangeError will be thrown.

Source

The data is collected from Sweden's central bank, Sveriges Riksbank, via their official API.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.3.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.3.0
    0
  • 1.2.0
    0
  • 1.1.0
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @xrates/usd-sek

Weekly Downloads

0

Version

1.3.0

License

MIT

Unpacked Size

18.1 kB

Total Files

15

Last publish

Collaborators

  • linusu