Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

TempStreetAddress

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

TempStreetAddress

  • 1.0.5
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

== DESCRIPTION:

Parses one line street addresses and returns a normalized address object.

This is a near direct port of the of the perl module Geo::StreetAddress::US originally written by Schuyler D. Erle.
For more information see http://search.cpan.org/~sderle/Geo-StreetAddress-US-0.99/

== SYNOPSIS:

Parse United States addresses.

=== Basic Usage: require 'street_address' address = StreetAddress::US.parse("1600 Pennsylvania Ave, Washington, DC, 20500") address.street # Pennsylvania address.number # 1600 address.postal_code # 20500 address.city # Washington address.state # DC address.state_name # District of columbia address.street_type # Ave address.intersection? # false address.to_s # "1600 Pennsylvania Ave, Washington, DC 20500" address.to_s(:line1) # 1600 Pennsylvania Ave StreetAddress::US.parse("1600 Pennsylvania Ave") # nil not a full address

=== Informal/Loose Parsing address = StreetAddress::US.parse("1600 Pennsylvania Avenue", :informal => true) address.number # 1600 address.street # Pennsylvania address.street_type # Ave address.to_s # 1600 Pennsylvania Ave

=== Zip+4 address = StreetAddress::US.parse("5904 Richmond Hwy Ste 340 Alexandria VA 22303-1864") address.postal_code_ext # 1846

address = StreetAddress::US.parse("5904 Richmond Hwy Ste 340 Alexandria VA 223031864") address.postal_code_ext # 1846

=== Gemfile: To use from your Gemfile: gem 'StreetAddress', '1.0.3', :require => "street_address"

FAQs

Package last updated on 12 Jun 2013

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