New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

iso_codes

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iso_codes

  • 0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

ISO Codes

Dan Webb (dan@massiverobot.co.uk)

Small and simple Ruby gem that allows you to look up and list ISO codes for countries, languages and currencies.

Each part of the library is lazily loaded so you only load the data you use. If you'd like to add any other useful ISO code lookups then feel free to fork.

Source data from: http://www.commondatahub.com/ and will be kept up to date periodically.

Usage

require 'rubygems' require 'iso_codes'

Language.all #=> An array of all language objects (for filling form selects etc) Language.find_by_a2('en') #=> find the language with the 2 character code 'en'

Country.find_all_by_region('Europe') #=> returns all countries in Europe

Currency.find_by_country('GB') #=> returns Currency representing GBP

For more info check the tests.

FAQs

Package last updated on 09 Oct 2009

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc