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 🙏

© 2026 – Pkg Stats / Ryan Hefner

nanotera-map

v0.0.5

Published

This map claims to fetch iriszones on french country and display it on map

Readme

NanoteraMap

This map claims to fetch iriszones on french country and display it on map

Install

yarn add nanotera-map

Props

type NanoTeraMapType = {
    /* 
    * Mapbox accesstoken 
    * Info: https://docs.mapbox.com/api/accounts/tokens/#token-format
    * eg: pk.eyJ******
    */
    accesstoken: string;
    /*
    * The address you want to display the data
    * The format of the address should be formatted like this:
    * eg: 5 Boulevard de Bonne Nouvelle, Paris
    */
    address: string;
    /*
    * The iris zones you want to display on initial render
    * ex: ["751103806", "751020702"]
    * 
    */
    irisZones: string[];
    /*
    * The opts for mapbox
    * zoom: initial zoom of the map
    * minZoom: minimal zoom on the map
    * maxZoom: maximum zoom on the map
    * center: coordinates latitude/longitude
    */
    opts?: {
        zoom?: number;
        minZoom?: number;
        maxZoom?: number;
        center?: number[];
    };
};

Event

type UpdateMap = {
  // array of iris zones
  irisZones: string[];
  // count of iriszones clicked
  clickedZones: number;
  // get population adult >= 18
  populationCount: number;
};
/*
const el = document.querySelector('updated:map', (e) => {
  console.log(e.detail) // type UpdateMap
})
 */

Usage

Example with React

// NanoTeraMap.tsx
import React from "react";

import "nanotera-map";
import "nanotera-map/dist/style.css";

import type { NanoTeraMapType } from "nanotera-map";

const NanoTeraMap = ({
  accesstoken,
  address,
  irisZones,
  opts,
}: NanoTeraMapType) => {
  const ref = React.useRef<HTMLElement | null>(null);

  React.useEffect(() => {
    ref.current?.addEventListener("updated:map", (e) => {
      console.log(e.detail);
    });
  }, []);
  
  return (
    <nanotera-map-element
      ref={ref}
      address={address}
      accesstoken={accesstoken}
      irisZones={irisZones}
      options={JSON.stringify(opts)}
    ></nanotera-map-element>
  );
};

export default NanoTeraMap;
// App.tsx
import NanoTeraMap from "./NanoTeraMap";

const App = () => {
  return (
    <>
      <NanoTeraMap
        address="5 Boulevard de Bonne Nouvelle, Paris"
        accesstoken="<mapboxtoken>"
        irisZones={["751103806", "751020702"]}
      />
    </>
  )
}

Example with vanilla js

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Nanotera map</title>
  </head>
  <body>
    <nanotera-map-element accesstoken="token"
                          address="5 Boulevard de Bonne Nouvelle, Paris"
                          irisZones={["751103806", "751020702"]}
    ></nanotera-map-element>
    
    <script defer type="text/javascript" src="./path/to-map.js"></script>
    <script>
      const map = document.querySelector('nanotera-map-element')
      
      map.addEventListener('updated:map', (e) => {
        console.log(e.detail)
      })
    </script>
  </body>
</html>