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 🙏

© 2025 – Pkg Stats / Ryan Hefner

leaflet-hash-plus

v0.1.0

Published

Leaflet plugin for interacting with the location hash

Downloads

104

Readme

Leaflet Hash Plus

Leaflet mappping plugin for interacting the location hash in the address bar. Allows for you to update the hash and for your code to be notified of changes in the hash (by the user navigating) or manually editing the location hash.

This plugin is based on Leaflet-hash. This plugin has seen no activity since 2013 and I'm judging it to abandoned. Out of my own necessity I have I have built Leaflet Hash Plus to support an expanded set of features (some requested for leaflet-hash).

Status

This plugin is current an alpha version: you are welcome to test it but please be aware that the API, names and conventions used within this plugin are liable to change.

Please check the change log for the changes.

Overview

The idea of embedding zoom, latitude and longitude into the location hash is fairly obvious: map.html#13.0000/54.5252/-3.0151 is much better for bookmarking so that when you return to the map it's in the same location/zoom as where you left it, however it doesn't address bookmarking extra map data such as objects, layers and other items that make up the map's state.

Leaflet Hash Plus allows for extra parameters after the zoom/location hash properties, entirely of your choosing.

The approach is low level to allow for it to be used in a wide variety of scenarios. If you want your location hash to reflect enabled layers such as restaurants, shops and transport and the option of showing the weather, you can either encode the data as:

map.html#13.0000/54.5252/-3.0151/layer:restaurants/layer:shops/layer:transport/weather=true

or

map.html#13.0000/54.5252/-3.0151/layers:restaurants,shops,transport/weather=true

The choice is yours. The meta data you pass to the plugin and receive from it is just an array of strings, using the '/' as a delimiter. If the map was loaded using the second link you would receive ['layers:restaurants,shops,transport', 'weather=true'] as the hash meta data.

If your code wanted to update the hash to reflect that the map is now only showing shops and weather is disabled, you would pass this meta data to the plugin ['layers=shops', 'weather=false'].

How does it work?

Documentation and demos can found here.

You can also check out the comments in the source code