Sha256: 4a3d00b6961db40b79ff45c32f651f234bdce627079b965679e2fc104b1e4365

Contents?: true

Size: 528 Bytes

Versions: 9

Compression:

Stored size: 528 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.currency == currency_code
        result =
          country: country_name
          cldr_symbol: data.cldr_symbol
          symbol: data.symbol
          currency: data.currency
        break

    result

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
twitter_cldr_js-2.4.0 lib/twitter_cldr/js/mustache/shared/currencies.coffee
twitter_cldr_js-2.3.2 lib/twitter_cldr/js/mustache/shared/currencies.coffee
twitter_cldr_js-2.3.1 lib/twitter_cldr/js/mustache/shared/currencies.coffee
twitter_cldr_js-2.3.0 lib/twitter_cldr/js/mustache/shared/currencies.coffee
twitter_cldr_js-2.2.4 lib/twitter_cldr/js/mustache/shared/currencies.coffee
twitter_cldr_js-2.2.3 lib/twitter_cldr/js/mustache/shared/currencies.coffee
twitter_cldr_js-2.2.2 lib/twitter_cldr/js/mustache/shared/currencies.coffee
twitter_cldr_js-2.2.0 lib/twitter_cldr/js/mustache/shared/currencies.coffee
twitter_cldr_js-2.1.0 lib/twitter_cldr/js/mustache/shared/currencies.coffee