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

force-mindmap

v1.0.2

Published

Interactive mind map written with d3 and typescript.

Readme

What is this?

work in progress

Installation

Installation is a work in progress, as I currently have no clue on|

  1. include typings files with js so that IDEs can identify
  2. creating a UMD version (I cant seem to the the babel-loader working) especially with d3.

It should, for now, work with

npm install -s force-mindmap

or

yarn add force-mindmap

or of course, you can just take canvasMindMap.ts and mindMapHelper.ts and compile them yourself.

Basic Usage

import * as ForceMindMap from 'force-mindmap';

...

Using with React

  • This module does not support server side rendering* If you are making a React app that is rendering serverside, you need to make sure to initialise and call startGraph() on componentDidMount().

An example React App (built with GatsbyJS) is available here

APIs

startGraph()

Start simulation for the graph.

gotoParentNode()

Go to the parent node (go up one level). This is used to implement a back button.

gotoNode(nodeName| string)

Go to nodeName node used to navigate to any node. You can use this with bread crumb to create a navigable breadcrumb.

breadcrumb| string[]

Returns breadcrumb(list of all parent nodes) for the current node. For example, imagine a node structure like grandfather -> father -> child.

  • For child, this will return ["father", "grandfather"].
  • for father, this will return ["grandfater"].
  • for grandfather, this will return [].

#Customisation Force-Mindmap exposes various variables for you to configure the mindmap. Most are pretty self explanatory.

property name | type | default --- | --- | --- animationDuration | number | 100 linkColor | number | #9095a0 linkWidth | number | 2 textColorRange | string[] | [ "#72dbe5,#62abd6","#5fa7dd","#4678c4","#284a96"] strokeColor| string | "#FFF" parentStrokeColor| string | "#b6ead9" textStrokeWidth| number | 5 textAlign| string | "center" fontSizeRange| number[] | [60, 35, 20] fontFamily| string | "Open Sans" fontWeight| valid css fontWeight option | "bolder" tagColorRange| string[] | ["#abf4cb","#a9f466","#f25c5c","#f4c2ab","#b47cea","#ffb5f0","#fbffc1","#ffb349"] tagFontSize| number | 20 collsionRadius| number | 55 chargeForce| number | -100 linkDistance| number | 160