Sha256: e7ff2c46be0cc2ff4b66f381ec76ceaaf0600b5c2e89c44c460c565fa4b688aa

Contents?: true

Size: 592 Bytes

Versions: 4

Compression:

Stored size: 592 Bytes

Contents

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

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

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

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

    result

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
twitter_cldr_js-3.3.0 lib/twitter_cldr/js/mustache/implementation/shared/currencies.coffee
twitter_cldr_js-3.2.0 lib/twitter_cldr/js/mustache/implementation/shared/currencies.coffee
twitter_cldr_js-3.1.1 lib/twitter_cldr/js/mustache/implementation/shared/currencies.coffee
twitter_cldr_js-3.1.0 lib/twitter_cldr/js/mustache/implementation/shared/currencies.coffee