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

it-helpers

v1.4.0

Published

Helpers for augm-it

Readme

it-helpers

Helpers for augm-it

These helper functions, along with uhtml are included the browser runtime for augm-it

Codepen


API

css, raw

Both css and raw can be used as identity functions for strings and plain-tag for template tag literals

Example

import { css, raw } from 'it-helpers'
let x = '#f00';
let style = css`
  .test{
    color: ${x}
  }
`
/** OR **/
style = css(".test{color:"+x+"}")

classify, mangle

These return proxies to generate CSS class names. The proxy resolves to a string within template literals (when cast to a primitive using Symbol.toPrimitive) or when .toString() is called. When a property is accessed from the proxy, it returns the "base" string plus the property name. "[base]__[property]"

  • classify is meant for on-site components when name-clashing can be manually prevented
  • mangle is meant for external imports of components when name-clashing is a concern

Example

let it = classify('MyButton')

console.log(`${it}`) // MyButton
console.log(it.toString()) // MyButton
console.log(it.container) // MyButton__container
console.log(it.overlay) // MyButton__overlay

console.log(it) // Proxy({})
console.log('.'+it) // .MyButton

it = mangle('Btn2') // random ID generated when mangle is called

console.log(`${it}`) //Btn2-fa31b46
console.log(it.container) // Btn2-fa31b46__container
console.log(it.overlay) // Btn2-fa31b46__overlay

uid

Exports a version of @lukeed/uid that guarantees that the first character is a _ so that they will be valid CSS selectors.


liveCSS

liveCSS behaves just like css and raw, but automatically injects a style tag into with the contents. Returns the style node.


Putting it together

import { html } from 'uhtml'
import { css, classify } from 'it-helpers'

let Header = classify('Header')

let style = css`
  /* .Header{ ... } */
  .${Header}{ 
    width: 100%;
    padding: 4rem 0;
  }
   /* .Header__container{ ... } */
  .${Header.container}{
    width: 80%;
    display: block;
    margin: auto;
  }
  /* .Header__title{ ... } */
  .${Header.title}{
    font-size: 2rem;
    text-align: center;
  }
`

License

MIT © Marshall Brandt