Sha256: 36863a09d512854a577f7cff385b72c17e97ca92b205616305804bfa85efcc8b

Contents?: true

Size: 510 Bytes

Versions: 1

Compression:

Stored size: 510 Bytes

Contents

# Copyright 2012 Twitter, Inc
# http://www.apache.org/licenses/LICENSE-2.0

class TwitterCldr.Currencies
  @currencies = `{{{currencies}}}`

  @currency_codes: ->
    @codes ||= (data.code for _, data of @currencies)

  @for_code: (currency_code) ->
    result = null
    for country_name, data of @currencies
      if data.code == currency_code
        result =
          country: country_name
          code: data.code
          symbol: data.symbol
          currency: data.currency
        break

    result

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
twitter_cldr_js-2.0.0 lib/twitter_cldr/js/mustache/shared/currencies.coffee