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

ia

v0.0.1-beta

Published

Information Architecture (IA) utilities.

Downloads

55

Readme

ia.js

ia.js is a collection of utilities to manage information architecture. It currently only provides an API for an extensible hierarchical information architecture (a site map, for example).

Universe

The Universe refers to the top-level organization of all content. The name is taken from set theory, where "universe" refers to the set of all relevant elements. In ia.js, the Universe object is also a Node (the root node, if you will).

Node

Node represents a content node (for example, a page on a website). Every content node has a unique path-like address in the Universe. There are three types of nodes:

  • Content node: regular node that has a user-defined payload (aka data aka content).
  • Placeholder node: node that provides hierarchical structure, is not reflected in the short address, and has no payload.
  • Transparent node: node that provides hierarchical structure, is not reflected in the short address, but has a payload.
  • Reference node: node that is an alias for another node (by extension, the payload of a reference node is the payload of the node it references).

Content Addressing

Content is addressed one of two ways: either by its formal address, or by its short address. The formal address reflects the organization of all of your content. The short address mirrors the formal address, but with placeholder nodes (see below) removed.

For example, consider the following IA:

Formal Address 
(as tree)           Formal Address                       Short Address
-----------------   -------------------                  ----------------
/products           /products                            /products
  /by-name          /products/by-name                  
    /anvil          /products/by-name/anvil              /products/anvil
    /balloon        /products/by-name/balloon            /products/balloon
    /chisel         /products/by-name/chisel             /products/chisel
  /by-category      /products/by-category                /products/by-category
    /tools          /products/by-category/tools          /products/tools
      /anvil        /products/by-category/tools/anvil    /products/anvil
      /chisel       /products/by-category/tools/chisel   /products/chisel
    /fun            /products/by-category/fun            /products/fun
      /balloon      /products/by-category/fun/balloon    /products/balloon

This example demonstrates all types of node. /products/by-name is a placeholder node. That is, it helps organize content, but has no content (reflected by the fact that it has no short address). Because /products/by-name is a placeholder node, it does not appear in the short address of its children. /products/by-category, /products/by-category/tools, and /products/by-category/fun are transparent nodes: they have content, but do not appear in the short address of their children. Finally, /products/by-category/tools/anvil (like the other categorized products) is a reference node, referring to /products/anvil.

Usage

TODO: this library is under construction, and will be documented soon.

Contributing

If you wish to contribute to this, make sure your contributions pass all existing tests (npm test). PRs should generally include new tests.