
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@loadsmart/utils-geolocation
Advanced tools
utils-geolocationuseful functions for dealing with geolocation data
$ npm i @loadsmart/utils-geolocation --save
$ yarn add @loadsmart/utils-geolocation
import React from 'react'
import {
isValidGeoSuggestion
} from '@loadsmart/utils-geolocation'
export default ({geoData}) => (
<div>
{ isValidGeoSuggestion(geoSuggestionData) ? <Map data={geoData} /> : <Error /> }
</div>
)
These are the functions available at this library:
gMapsToAddressComponentsObject(gmaps, config)Converts a gmaps object containing the adress_components field to an object in the form:
{
"city": "City Name",
"state": "ST",
"country": "CT",
"zipcode": "00000"
}
isValidGeoSuggestion(geoSuggestion)Checks if the passed geoSuggestion is a valid geo suggestion object, containing all required fields (location, gmaps, and description), returns a boolean.
FAQs
useful functions for dealing with geolocation data
We found that @loadsmart/utils-geolocation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 20 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.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.