npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

open-geo-words

v1.0.6

Published

Convert coordinates into user-friendly three words

Downloads

2

Readme

Open Geo Words

Convert coordinates into user-friendly three words

Inspired by what3words. This standalone js library converts coordinates into three words that are easier to read, write, and communicate with. Essentially, each 3m block in the whole world is mapped to a set of words.

Conversion example

var lonlat  = [73.1132, 33.5321];
var result = OpenGeoWords.generateWordsString(lonlat)
///blower.endurance.napier

Reverse convert example

var words = "///blower.endurance.napier"
var result = OpenGeoWords.parseWordsString(lonlat)
// [73.1132, 33.5321]

Explore the examples directory for demos that you can run on your browser.

Install via npm

npm install open-geo-words

And then in your browser code:

import { OpenGeoWords } from "open-geo-words";

Or in your Node.js code:

var { OpenGeoWords } = require("open-geo-words");

Install via <script> tag from CDN

<script src="https://unpkg.com/[email protected]/dist/open-geo-words.js"></script>

And then in your code:

var OpenGeoWords = new window["open-geo-words"].OpenGeoWords;

Purpose

What3words is pretty amazing, but it only works as an online API. In GIS and mapping domain, there is an increasing demand for offline systems so I decided to write this tiny script in a couple of hours to provide an alternative.

Limitations

~~Currently a four words string is generated instead of three. That is because the words list I am using only has about 8000 words. I am looking for a list of about 60k words to properly map the world in three words. The list must only contain most frequent words in simple english, without any profanity and complications. If you find such a list, please let me know.~~

Three words are now supported. The dictionary of about 60k words is built in, and heavily compressed to speed up the page load.

Stay in touch

For latest releases and announcements, check out my site: aliashraf.net

License

This software is released under the MIT License. Please read LICENSE for information on the software availability and distribution.

Copyright (c) 2022 Ali Ashraf