Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@gojob/google-place
Advanced tools
A small node module to use the Google Place API written in typescript
This package is a library for Node.js to consume the Google Place autocomplete & details API. It returns a small subset of their data.
yarn add @gojob/google-place
import * as gp from '@gojob/google-place';
const results = await gp.autocomplete({
key: 'YOUR_API_KEY',
input: 'Port-de-Bouc',
language: 'fr',
countries: ['fr'],
});
query
)Name | Type | Description |
---|---|---|
key | string | Google API Key |
input | string | Searched entry |
language | string | Language to use (optional) Google Code |
countries | string[] | Filter on a country (optional) ISO 3166-1 Alpha-2 |
Returns a list of prediction or throw if an error occurred.
interface IPrediction {
id: string;
name: string;
}
As:
Name | Type | Description |
---|---|---|
id | string | Place id |
name | string | Place name |
query
)const place = gp.retrieve({
key: 'YOUR_API_KEY',
id: 'ChIJ-RzUxt8ethIRksIaOl-0tJY',
language: 'fr',
});
As:
Name | Type | Description |
---|---|---|
key | string | Google API Key |
id | string | Searched entry |
language | string | Language to use (optional) Google Code |
Returns a place or throw if an error occurred.
export interface ILocation {
lat: number;
lng: number;
}
export interface IPlace {
id: string;
address: string;
location: ILocation;
postalCode: string;
locality: string;
administrativeAreaLevel1: string;
administrativeAreaLevel2: string;
countryCode: string;
country: string;
}
As:
Name | Type | Description |
---|---|---|
id | string | Place id |
address | string | Formatted address |
location | object | Latitude and longitude coordinates |
postalCode | string | Postal code |
locality | string | Locality name (long or short name) |
administrativeAreaLevel1 | string | Administrative Area Level 1 (long or short name) |
administrativeAreaLevel2 | string | Administrative Area Level 2 (long or short name) |
countryCode | string | Country short name |
stateCode | string | Administrative Area Level 1 (short name) |
country | string | Country name (long name) |
postalCode, administrativeAreaLevel1 or administrativeAreaLevel2 may be empty string
const place = gp.reverseGeocode({
key: 'YOUR_API_KEY',
latlng: 'XXX,YYY',
language: 'fr',
});
As:
Name | Type | Description |
---|---|---|
key | string | Google API Key |
latlng | string | Latitude and longitude coordinates (coma separated) |
language | string | Language to use (optional) Google Code |
Find an address from a location coordinates. Returns a IPlace
.
[1.8.0] - 2023-04-20
stateCode
in retrieve
and reverse-geocode
FAQs
A small node module to use the Google Place API written in typescript
The npm package @gojob/google-place receives a total of 555 weekly downloads. As such, @gojob/google-place popularity was classified as not popular.
We found that @gojob/google-place demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.