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

kunkun-ext-string-utils

v1.4.0

Published

This is an extension for [Kunkun](https://docs.kunkun.sh/) that provides a set of string utility functions.

Readme

Kunkun String Utilities Extension

This is an extension for Kunkun that provides a set of string utility functions.

Kunkun Install NPM Package Publish

GitHub License GitHub last commit

Currently supported functions:

Form

  • Truncate a string to a maximum length
  • Pad a string to a maximum length

Headless

  • Convert clipboard text to camelCase
  • Convert clipboard text to Capitalize text
  • Convert clipboard text to kebab-case (dash-case)
  • Convert clipboard text to lower case
  • Convert clipboard text to snake_case
  • Convert clipboard text to Start Case
  • Convert clipboard text to UPPER CASE
  • Convert clipboard text to rAnDoM CasE
  • Reverse clipboard text
  • Trim the clipboard text
  • Trim the end of clipboard text
  • Trim the start of clipboard text
  • Generate a Lorem Ipsum sentence into your clipboard
  • Repeat a string a given number of times

Development

pnpm install

Start extension in development mode. Every save will trigger a hot reload in Kunkun.

pnpm dev
  • During development, right click in Kunkun to open the developer tools.
    • Error messages will be shown in the console.
    • If you got any permission error while calling Kunknu's APIs, make sure you've declared the permission in package.json. Then go back to home page and enter the extension again to re-apply the permission.
  • To develop and preview the extension in Kunkun, you need to run the Add Dev Extension command in Kunkun, and register this extension's path.

Build the extension. Your extension source code can contain many files, but the build process will bundle them into a single file.

pnpm build
# Due to Bun's bug, if you are on windows, and install dependencies with pnpm, you may get error during build.
# Try install dependencies with bun or npm instead.

i18n

./src/i18n contains optional internationalization support starter code.

If you want to support i18n, you can use the t function to translate the strings in the extension.

User's language setting is available via app.language().

import { app } from "@kksh/api/ui/template"
import { setupI18n, t } from "./src/i18n"

setupI18n("zh")
console.log(t("welcome"))

setupI18n(await app.language())
console.log(t("welcome"))

Add More Commands

If you want to add more template worker extension commands, simply modify the entrypoints array in ./build.ts.

Then in package.json, register the new command.

Verify Build and Publish

pnpm build # make sure the build npm script works
npx kksh@latest verify # Verify some basic settings
npx kksh@latest verify --publish # Verify some basic settings before publishing

See Documentation for more details on how to publish your extension. You will need to publish your extension package to npm or jsr first with GitHub actioin, then register it on Kunkun's website.

TODO

  • [x] RaNdOm CaSE
  • [x] Lorem ipsum
  • [x] Repeat
  • [ ] Replace
  • [ ] Escape HTML
  • [ ] Unescape HTML
  • [ ] URL encode
  • [ ] URL decode
  • [ ] Base64 encode
  • [ ] Base64 decode
  • [ ] Slash escape
  • [ ] Slash unescape
  • [ ] Character count
  • [ ] Word count
  • [x] Reverse
  • [ ] ROT?