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

parse-google-autocomplete

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-google-autocomplete

Parse Google Maps autocomplete results into structured address data

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

parse-google-autocomplete Build Status

Parse Google Maps autocomplete results into structured address data

Works with most commonly typed US addresses. The results aren't always perfect—open a PR with new test fixtures if you find an unhandled case.

Install

$ npm install --save parse-google-autocomplete

Usage

var parse = require('parse-google-autocomplete')

parse([
  {
    description: '1 Market Street, San Francisco, CA, United States',
    // ...
  },
  // ...
])
//=> {id: 'abc', business: true, ...}

API

parse(data) -> array
data

Required
Type: array[object]

An array of Google place results objects. See the test fixtures for examples.

The data is parsed into the following values, where empty values will be null:

id

Type: string

The unique Google place ID.

business

Type: boolean

Indicates whether the result is a business based on the presence of the "establishment" primary result type.

title

Type: string

The name of the business, if applicable.

street / city / state / zip

Type: string

The parsed address data derived from the terms matched by Google.

License

MIT © Ben Drucker

Keywords

FAQs

Package last updated on 16 Mar 2016

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