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

extenify-dev

v0.0.5

Published

A tiptap extendable implement

Readme

extenify-dev

extenify is a general extension kit that can be use to enhance host with the ability to work with extensions.things like I can wrap tanstack table and extenify into a new tiptable with extensions features work with.

Usage

import { createTable, getCoreRowModel, getSortedRowModel } from "@tanstack/table-core"
import { Extension, Extenify, provide } from "extenify-dev"

declare module "extenify-dev" {
  export interface Lifecycle {
    onBeforeCreate?(this: { name: string }): void
  }
}

const SortExtension = Extension.create({
  name: "extension.sort",
  defaultOptions: {
    docs: `defaultOptions is Extension internal options, can be override by Extension.configure()`,
  },
  // finally will be merged in Extenify with property extenify.options to provide to the host
  addOptions() {
    console.log("addOptions")
    return {
      state: {
        sorting: [],
      },
      getCoreRowModel: getCoreRowModel(),
      getSortedRowModel: getSortedRowModel(),
    }
  },
  // for Extension internal storage(state)
  addStorage() {
    console.log("addStorage")
    return {
      sort: [],
    }
  },
  addCommands({ table }) {
    console.log("addCommands", this.storage.sort)
    return {
      toggleSort: () => {
        // use context
        table.toggleSort()
        // or use this scope
        this.table.toggleSort()
      },
    }
  },
  addKeyboardShortcuts({ commands }) {
    console.log("addKeyboardShortcuts")
    return {
      "Mod-k": () => {
        // use context
        commands.toggleSort()
        // or use this scope
        this.commands.toggleSort()
        return false
      },
    }
  },
  onBeforeCreate() {
    console.log("onBeforeCreate", this.name)
  },
})

const table = createTable()

provide("table", table)
// or
provide({
  table: table,
  editor: editor,
})

const extenify = Extenify.create({
  extensions: [
    // .configure() only merge defaultOptions and return the same instance(NOT a new instance)
    SortExtension.configure({
      usage: `this will merge the defaultOptions in SortExtension internal`,
    }),
    // .extend() will merge all properties and return a new instance
    SortExtension.extend({
      name: ``,
      defaultOptions: {
        usage: `all properties in SortExtension.extend will merge the internal properties`,
      },
    })
  ],
})

console.log(extenify.extensions) // all extensions

extenify.commands.toggleSort() // with type safe
provide({
  table: table,
  editor: editor,
})

Extension.create((context) => {
  const { table, editor } = context
  return {
    addOptions(context) {
      const { table, editor } = context
    },
    addStorage(context) {
      const { table, editor } = context
    },
    addCommands(context) {
      const { table, editor } = context
    },
    addKeyboardShortcuts(context) {
      const { table, editor } = context
    },
  }
})

Extension.create({
  addOptions(context) {
    const { table, editor } = context
  },
  addStorage(context) {
    const { table, editor } = context
  },
  addCommands(context) {
    const { table, editor } = context
  },
  addKeyboardShortcuts(context) {
    const { table, editor } = context
  },
})