
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@mapbox/geocoder-abbreviations
Advanced tools
Geocoder Abbreviations divided into language groups. These are lossy word replacements that are useful for geocoding.
In the tokens
directory, each JSON file contains a list of word equivalencies
for one language and is named by language code.
Each group contains a list of tokens that are considered semantically equivalent
to one another -- they have the same meaning, but some might be abbreviations,
alternate spellings, etc. Different groups might overlap with one another in the
tokens they contain, if the same abbreviation can be used to represent
semantically distinct concepts; for example, in English, 'Cl' is short for both
'Clinic' and 'Close', but 'Clinic' and 'Close' are not equivalent, so the
en.json
file contains two different groups that both contain the 'Cl' token.
Each group also contains additional properties that might be of use in deciding how to employ the token list in question. They are:
address
if present)false
.false
. If false, words should
be assumed not to have been escaped for use in regular expression (e.g.,
periods are just periods), and consumers who want to use them in regular
expressions should perform their own escaping before doing so.false
.false
.geocoder-abbreviations is available as a Node.js package and as a Rust crate.
index.js exposes a single function with an optional lang
arg or if null
returns a map of all the tokens separated by language. It takes an optional
second boolean argument for whether or not to include groups with a single
token in them, and a third optional boolean argument for whether or not to
return the full/advanced representation including all metadata, or a simpler
version of just tokens with no metadata that's backwards-compatible with earlier
releases of this library.
See the index.js JSDoc for more details
geocoder-abbreviations isn't currently published on crates.io. To add it to your
project, add the following to your Cargo.toml
[dependencies]
:
geocoder-abbreviations = { git = "ssh://git@github.com/mapbox/geocoder-abbreviations.git", rev = "master" }
SSH authentication requires ssh-agent to be running to acquire the SSH key. Make sure the appropriate environment variables are set up (SSH_AUTH_SOCK on most Unix-like systems), and that the correct keys are added (with ssh-add).
FAQs
Language/Country Specific Street Abbreviations
We found that @mapbox/geocoder-abbreviations demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 14 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
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.