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

@cumjar/websmack

v1.2.0

Published

web bundlers' hard work undone.

Downloads

42

Readme

Websmack

Web bundlers' hard work undone.

See CONTRIBUTING.md pls thx

All functions take a key to override attempting to find one itself.

This project continued and relocated from PolyStratum/webunpack -- yellowsink 2022-05-16

All site lists are non-exhaustive.

Top level API documentation

autoraid(): ["find method", {...}, ?wpRequire]

Just grabs the modules, trying every method until one works.

webpackJsonp(): [{...}, wpRequire]

  • Slack
  • Twitter
    • Tweetdeck
  • MS Teams (not the rest of Office 365!)
  • Deezer
  • Soundcloud

webpackChunk(): [{...}, wpRequire]

  • Discord
  • Telegram (mostly)
  • Tidal
  • Spotify (web & app)

parcelRequire(): {...}

Works on apps built with Parcel. No currently known sites/apps.

createApi([, modules, ?wpRequire]): {api}

Creates an api of webpack searchers given found raw modules. Designed to work in such a way that you can pass autoraid() directly to createApi.

API docs further down.

Yeah I know wrapping apis in a closure is cringe for bundle size and stuff, but like its just cleaner to use this way.

autoApi(): {api}

createApi(autoraid())

batchFind([, modules]): (callback) => [...]

Batch find a large number of modules. Includes all functions from createApi except findByCode.

batchFind(autoraid())(
	({ findByProps, findByDisplayName }) => {
      findByProps("dirtyDispatch");
      findByDisplayName("Markdown");
    }
);

searcher API documentation

find(filter): module

Finds the first module that matches the predicate.

findAll(filter): [...]

Finds all modules that match the predicate

findByCode(code): module

!!! This function does not work in batch finds and in non-webpack situations !!!

Finds a module by checking if a string / regex matches the bundled code.

Has an all variant.

findByDispNameDeep(name): module

Finds by display name but also breaks through wrappers like memo (most of the time).

Has an all variant.

findByDisplayName(name, defaultExp = true): module

Finds a module by its display name (if the app exports that prop on components). Setting defaultExp to false will return the parent of the component for patching.

Has an all variant.

findByKeyword(...keys): module

Finds a module by case insensitive substring matching. Useful for finding things you dont know the name of.

Has an all variant.

findByNestedProps(...props): module

Finds a module by prop names in props of the module... weird to explain but useful for some apps (eg Kaiheila). For example, findByNestedProps("prop") => { a: { prop: ... }, b: ... }

Has an all variant.

findByProps(...props): module

Finds a module by props that exist on it. This will probably be your bread-and-butter finding function in apps that dont minify away export keys (eg Discord).

Has an all variant.