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

toonkit

v1.0.6

Published

Typed Object Oriented Notation (TOON) parser and serializer for frontend and backend JavaScript applications. Lightweight, type-safe, schema-based alternative to JSON for APIs, microservices, and automation.

Readme


📦 toonkit

npm downloads license

Typed Object Oriented Notation (TOON) parser & serializer for frontend and backend JavaScript applications.

🚀 Lightweight • Type-safe • Human-readable • API-friendly

🌐 Docs: https://toonkit.manojgowda.in 💻 GitHub: https://github.com/ManojGowda89/toonkit


✨ Why toonkit?

JSON is powerful but verbose.

TOON provides:

✅ smaller payloads ✅ human-readable format ✅ schema with types ✅ multi-resource support ✅ frontend ⇄ backend symmetry ✅ perfect for APIs, bots & automation


🧠 What is TOON?

TOON = Typed Object Oriented Notation

It combines:

✔ schema ✔ data ✔ types ✔ compact structure


🧾 Example TOON

meta{page:n,limit:n,total:n}:
1,10,200

employees[2]{id:n,name:s,salary:n,active:b}:
1,Riya,90000,true
2,John,80000,false

departments[1]{id:s,title:s}:
10,Engineering

🔄 Parsed JSON Output

{
  meta: { page: 1, limit: 10, total: 200 },

  employees: [
    { id: 1, name: "Riya", salary: 90000, active: true },
    { id: 2, name: "John", salary: 80000, active: false }
  ],

  departments: {
    id: "10",
    title: "Engineering"
  }
}

🧬 Supported Data Types

| Code | Type | Example | | ---- | ----------- | ------- | | n | number | 25 | | s | string | Manoj | | b | boolean | true | | nl | null | null | | j | JSON object | {"a":1} | | a | array | [1,2,3] |


Example With All Types

sample{age:n,name:s,active:b,data:j,tags:a,value:nl}:
25,Manoj,true,{"x":1},["a","b"],null

📥 Installation

npm install toonkit

🧩 Importing toonkit

CommonJS

const { sendToon, receiveToon, reqGetToon, resSendToon } = require("toonkit");

ES Modules

import { sendToon, receiveToon, reqGetToon, resSendToon } from "toonkit";

🌐 Frontend Usage

✅ Convert JSON → TOON

import { sendToon } from "toonkit";

const payload = sendToon({
  employees: [
    { id: 1, name: "Riya", salary: 90000, active: true },
    { id: 2, name: "John", salary: 80000, active: false }
  ]
});

✅ Send to API

await fetch("/api", {
  method: "POST",
  headers: { "Content-Type": "text/plain" },
  body: payload
});

✅ Convert TOON → JSON

import { receiveToon } from "toonkit";

const text = await res.text();
const data = receiveToon(text);

🖥 Backend Usage (Express)

Setup

const express = require("express");
const { reqGetToon, resSendToon } = require("toonkit");

const app = express();
app.use(express.text());

Parse & Respond

app.post("/api", (req, res) => {

  const data = reqGetToon(req);

  console.log(data);

  resSendToon(res, data);
});

🧪 Using toonkit in Postman

Step 1: Method

POST

Step 2: Headers

Content-Type: text/plain

Step 3: Body → raw → Text

employees[2]{id:n,name:s,salary:n}:
1,Riya,90000
2,John,80000

Step 4: Send


📊 Pagination Example

sendToon({
  meta: { page: 1, limit: 10, total: 200 },
  employees: [...]
});

📦 Multiple Collections Support

sendToon({
  users: [...],
  products: [...],
  orders: [...]
});

Perfect for single API responses.


⚠️ Important Notes

✔ Enable Express text parser:

app.use(express.text());

✔ Use correct header:

Content-Type: text/plain

✔ Schema must match values.


⚡ Performance Advantage

Compared to JSON:

✔ smaller payload ✔ faster parsing ✔ human readable ✔ API efficient


🧠 When to Use toonkit

✅ APIs returning multiple resources ✅ bots & automation ✅ low bandwidth systems ✅ Chrome extensions ✅ microservices ✅ admin tools ✅ data pipelines


👨‍💻 Developer

Manoj Gowda 🌐 https://manojgowda.in


💬 Developer Note

Curious to explore new ideas and build tools that make development easier.

toonkit is created to:

✔ save time for developers ✔ simplify data exchange ✔ provide a single function flow for JavaScript lovers ✔ encourage contributions & innovation


🤝 Contributing

Contributions are welcome!

If you want to improve toonkit, open a PR or share ideas.

Let’s make data exchange simpler together 🚀


📚 Documentation

Full documentation available at:

👉 https://toonkit.manojgowda.in


💻 Source Code

GitHub Repository:

👉 https://github.com/ManojGowda89/toonkit


📄 License

MIT


⭐ If you like toonkit

Give it a star ⭐ and share with developers!