parse-google-autocomplete

WebJar for parse-google-autocomplete

License

License

MIT
Categories

Categories

Auto Application Layer Libs Code Generators
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

parse-google-autocomplete
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

parse-google-autocomplete
WebJar for parse-google-autocomplete
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/bendrucker/parse-google-autocomplete

Download parse-google-autocomplete

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/parse-google-autocomplete/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>parse-google-autocomplete</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/parse-google-autocomplete/
implementation 'org.webjars.npm:parse-google-autocomplete:1.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/parse-google-autocomplete/
implementation ("org.webjars.npm:parse-google-autocomplete:1.1.0")
'org.webjars.npm:parse-google-autocomplete:jar:1.1.0'
<dependency org="org.webjars.npm" name="parse-google-autocomplete" rev="1.1.0">
  <artifact name="parse-google-autocomplete" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='parse-google-autocomplete', version='1.1.0')
)
libraryDependencies += "org.webjars.npm" % "parse-google-autocomplete" % "1.1.0"
[org.webjars.npm/parse-google-autocomplete "1.1.0"]

Dependencies

compile (5)

Group / Artifact Type Version
org.webjars.npm : obstruction jar [2.0.0,2.1)
org.webjars.npm : array-find-index jar [1.0.1,1.1)
org.webjars.npm : value-get jar [1.0.0,1.1)
org.webjars.npm : value-pipe jar [1.0.0,1.1)
org.webjars.npm : array-find jar [1.0.0,1.1)

Project Modules

There are no modules declared in this project.

parse-google-autocomplete Build Status Greenkeeper badge

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

Versions

Version
1.1.0