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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@trendhim/data-plans

v0.28.0

Published

Source of truth for Trendhim's data plans. Helps generate data-plans for mparticle, and typescript definitions for nodejs projects.

Readme

Data Plans

Source of truth for Trendhim's data plans. Helps generate data-plans for mparticle, and typescript definitions for nodejs projects.

For more information about how mParticle uses data-plans to ensure data consistency, click here.

Folder structure

src
├── data-plans.ts             defines active data-plans
└── example-data-plan
    ├── event-type
    │   ├── base.ts           attribute definitions applied to all events of event-type
    │   ├── index.ts          defines active events of event-type
    │   └── example_event.ts  attribute definitions applied to example-event
    ├── base.ts               attribute definitions applied to all events
    ├── index.ts              exports properties matching the DataPlanExport interface mentioned below
    ├── user_attributes.ts    attribute definitions for user attributes (optional)
    ├── v1.ts                 event definition for data-plan version 1
    └── vX.ts                 event definition for data-plan version X (optional)

Creating a new data plan

Create a new directory in src with the name of the data-plan being the directory name.

Create src/<data-plan>/index.ts and ensure it exports the DataPlanExport interface. Add an import for your new data-plan in src/data-plans.ts, and to the default export.

Data plan events

Data plans support multiple versions of the same plan, and we intend to always introduce a new version, if we make a breaking change to a given data-plan. A breaking change can be, but is not limited to; removing attributes, changing attribute types, or adding new required attributes.

Create event

Add a new file to the relevant event-type-folder, and name it the same as your event. Ensure it imports and re-exports the base attributes of the event-type, as seen in the folder structure. Add an import for your new event in src/<data-plan>/<event-type>/index.ts, and re-export it accordingly.

Publish

mparticle

  1. Ensure you have configured your environment variables either directly, or through a .env-file. Needed variables: MPARTICLE_CLIENT_ID, MPARTICLE_CLIENT_SECRET and MPARTICLE_WORKSPACE_ID.
  2. Run npm run publish:data-plans

npm

  1. Bump the version in package.json
  2. Run npm publish --access public