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

mudom

v1.0.11

Published

µDOM utilities

Downloads

36

Readme

µDOM

Table of Contents generated with DocToc

What it Is

utilities to handle DOM-related tasks

Installation

npm install -g mudom
browserify -r mudom -o app/static/browserified/mudom.js

API

DOM

TEXT

KB

Demo on https://loveencounterflow.github.io/hengist/dev/mudom/static/index.html

How to Use It

To Do

  • [–] absorb µ.keyboard-modifier-emitter.js (svelte app2)

  • [–] absorb src/components/Toolbox/index.svelte#µ_DOM_detect_doublekey_events()

  • [–] documentation

  • [–] offer browserified builds

  • [–] allow lists of elements with event binding

  • [–] include things like computedStyleMap(), attributeStyleMap, computedStyleMap() from CSS Houdini

    • https://www.smashingmagazine.com/2020/03/practical-overview-css-houdini/
    • https://web.dev/houdini-how/?utm_campaign=CSS%2BLayout%2BNews&utm_medium=web&utm_source=CSS_Layout_News_281
    • https://web.dev/css-props-and-vals/
    • https://houdini.how/
  • [–] export classes Dom, Text, &c.

  • [–] this should work but doesn't:

    sub_document  = iframe.contentDocument
    first_tracker = µ.DOM.select_first_from sub_document, '.tracker'

    Error message is not a valid delement: HTMLDocument{...; suspicion is that HTMLDocument should be accepted as a (DOM) element

    Note the real problem is not the test x instanceof Element, the problem lies in the realm-crossing nature of the <iframe> element

    • solution might be to just check for presence of relevant API (like element.querySelectorAll?)
  • [–] allow to instantiate with virtual DOM object so µDOM can be used outside the browser

  • [–] integrate XPath &c from playlist µDOM2

  • [–] remove µ.DOM.select_*_from() methods; instead allow µ.DOM.select_first(), µ.DOM.select_all() to take one or two parameters

  • [–] ??? allow to pass in document on creation as it can differ from main document within iframes

  • [–] don't reference µ from with libraries, use private ref to avoid name collisions

  • [–] move loupe.js to deps

  • [–] integrate method to monitor all events in document or on given element as discussed in https://stackoverflow.com/a/72945018:

    for (const key in document) if (key.startsWith('on')) document.addEventListener(key.slice(2), console.log);
    // https://stackoverflow.com/a/72945018/319266
    function monitorEvents(element) {
      for (const key in element) {
        if (key.startsWith('on')) {
          element.addEventListener(key.slice(2), console.log);
        }
      }
    }