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

jsoneo

v1.0.3

Published

A powerful JSON enhancement library that supports all JSON primitives, Date, RegExp, Symbol, Functions, Map, Set, TypedArray and much more! Almost everything in JavaScript.

Downloads

81

Readme

jsoneo

A powerful JSON enhancement library that supports all JSON primitives, Date, RegExp, Symbol, Functions, Map, Set, TypedArray and much more! Almost everything in JavaScript.

Write once. Run unit testing in Node and Browsers.

A perfect partner for unit testing, which allowing Node.js (or others) and e2e tests to share one copy of test suite. Please check more details in the enum-plus project.

This project was extracted from enum-plus. It was designed to serialize Enum objects from Browser to Node.js, so that the same test suites in Jest can be reused in Playwright e2e tests. We don't have to duplicate our test logic in the two testing frameworks. This project was also previously named serialize-everything.js

Features

  • Serialize and deserialize almost everything in JavaScript
  • Interface with existing JSON APIs seamlessly
  • Built-in support for circular references
  • TypeScript support for better developer experience
  • Function serialization
    • Regular functions
    • Arrow functions
    • Async functions
    • Generator functions
    • Class methods
    • Function properties
  • Special values support
    • NaN, Infinity, -Infinity, -0
    • undefined (in objects, following JSON semantics)
  • Symbol handling
    • Built-in symbols (like Symbol.iterator)
    • Global symbols (via Symbol.for)
    • Local symbols with descriptions
    • Symbol as object keys
  • Advanced property handling
    • Non-enumerable properties preservation
    • Getter/setter methods (accessor properties)
    • Property descriptors (writable, configurable, enumerable)
  • Prototype chain handling
    • Complete prototype chain serialization
    • Preserves prototype methods and properties
  • Browser and Node.js compatibility
    • Automatic environment detection
    • Buffer handling (falls back to Uint8Array in browsers)
  • Raw JSON preservation
    • Direct support for JSON.rawJSON() objects
  • Custom API
    • Support for custom serialization and deserialization logic
    • toJSON/fromJSON method respect
    • Automatic API method preservation

Installation

Install using npm:

npm install jsoneo

Install using pnpm:

pnpm add jsoneo

Install using bun:

bun add jsoneo

Or using yarn:

yarn add jsoneo

Supported Types

  • JSON Primitives:

    • string
    • number
    • boolean
    • BigInt
    • null
    • plain object
    • array
  • Extended Types:

    • Date
    • RegExp
    • Symbol
    • Function
      • Normal functions
      • Arrow functions
      • Generator functions
      • Async functions
      • Classes
    • Map
    • Set
    • WeakMap (Structure only, without data)
    • WeakSet (Structure only, without data)
    • URL
    • URLSearchParams
    • TypedArray
      • Int8Array
      • Uint8Array
      • Uint8ClampedArray
      • Int16Array
      • Uint16Array
      • Int32Array
      • Uint32Array
      • Float32Array
      • Float64Array
      • BigInt64Array
      • BigUint64Array
    • ArrayBuffer
    • DataView
    • Buffer
    • Error
    • Iterable
    • RawJSON(via JSON.rawJSON()

Usage

import { parse, stringify } from 'jsoneo';

const json = {
  // String
  name: 'John',
  // Number
  age: 30,
  // Boolean
  isAdmin: false,
  // Date
  createdAt: new Date(),
  // RegExp
  pattern: /abc/gi,
  // BigInt
  bigValue: 12345678901234567890n,
  // Plain object
  address: {
    city: 'New York',
    zip: '10001',
  },
  // Plain array
  tags: ['developer', 'javascript'],
  // Array with objects
  projects: [
    {
      id: 1,
      name: 'Project 1',
      createdAt: new Date(),
    },
    {
      id: 2,
      name: 'Project 2',
      createdAt: new Date(),
    },
  ],
  // URL
  homepage: new URL('https://example.com?id=123'),
  // Symbols
  id: Symbol.for('id'),
  [Symbol.toStringTag]: 'User',
  // Map and Set
  roles: new Map([
    [Symbol.for('admin'), true],
    [Symbol.for('editor'), false],
  ]),
  permissions: new Set(['read', 'write']),
  // TypedArray
  bytes: new Uint8Array([1, 2, 3, 4]),
  // ArrayBuffer
  buffer: new ArrayBuffer(8),
  // function
  sayHello: () => `Hello, ${this.name}!`,
};

// Serialize
const serialized = stringify(json);
console.log('Serialized:', serialized);

// Deserialize
const deserialized = parse(serialized);
console.log('Deserialized:', deserialized);