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

@cldmv/jsonv

v1.0.0

Published

Modern JSON parser extending JSON5 with ES2015-2025 features, year-based API

Readme

@cldmv/jsonv

Modern JSON parser extending JSON5 with ES2015–2025 features and year‑pinned APIs.

What it is

@cldmv/jsonv is a static data format: JSON5 plus modern literals, with features gated by ECMAScript year modules. It adds internal references (file‑scoped, defined‑before‑use) and forbids executable syntax (no functions, classes, computed keys, or shorthand props).

Core features

  • JSON5 superset (comments, trailing commas, single quotes, hex, etc.)
  • Year‑pinned APIs: @cldmv/jsonv/2011, /2015, /2020, /2021 (2022–2025 re‑export 2021)
  • Modern literals: binary/octal, BigInt, numeric separators
  • Internal references and template interpolation (ES2015+), including forward references
  • Diagnostics: diagnose() and info() for year + feature detection
  • Stringify with json/json5/jsonv modes, BigInt strategies, and raw JSON passthrough
  • Dynamic year loading and resolver utilities (loadYear, resolveYear)
  • Zero dependencies, hand‑written parser

Install

npm install @cldmv/jsonv

Quick start

import { parse, stringify } from "@cldmv/jsonv";

const config = parse(`{
  port: 8080,
  host: "localhost",
  url: `http://${host}:${port}`,
  maxConnections: 1_000_000,
  bigValue: 9007199254740992n
}`);

const text = stringify(config);

Year‑pinned API

Pin a year for stable grammar rules:

import { parse } from "@cldmv/jsonv/2021"; // numeric separators + BigInt
import { parse as parse2015 } from "@cldmv/jsonv/2015"; // binary/octal + templates
import { parse as parse2011 } from "@cldmv/jsonv/2011"; // JSON5 base

See docs/feature-matrix.md and docs/versioning-and-exports.md.

Docs

API surface

Main entry: src/index.mts

Parse options (selected)

  • year: 2011–2025 (defaults to latest)
  • mode: jsonv | json5 | json
  • allowInternalReferences: default true
  • strictBigInt: require n for unsafe integers (default false)
  • strictOctal: require 0o (reject legacy 0755, default false)
  • tolerant: collect multiple errors
  • preserveComments: keep comment nodes in results

Stringify options (selected)

  • mode: jsonv | json5 | json
  • bigint: native | string | object
  • singleQuote, trailingComma, unquotedKeys
  • preserveNumericFormatting

Full types: src/api-types.mts

Internal references

{ port: 8080, backup: port, url: `http://${host}:${port}` }

Rules: file‑scoped only, forward references supported, no circular refs.

Year utilities

import { loadYear, getLoadedYear } from "@cldmv/jsonv/loader";
import { resolveYear, isPublishedYear, getPublishedYears } from "@cldmv/jsonv/year-resolver";

const jsonv2023 = await loadYear(2023); // resolves to 2021
const resolved = getLoadedYear(2017); // 2015
const published = getPublishedYears(); // [2011, 2015, 2020, 2021]
const isPublished = isPublishedYear(2021); // true
const nearest = resolveYear(2024); // 2021

Diagnostics

diagnose() returns detected year/features + compatibility flags (json, json5). info() returns only detected year + parsed value.

Tests & fixtures

Tooling

  • ESLint plugin: plugins/eslint-plugin-jsonv (build via npm run build:plugin)
  • VS Code language support: plugins/vscode-jsonv

Development

npm run dev       # uses src/ via json-dev condition
npm run build     # clean → ts → types → years → cjs → plugin
npm test          # Vitest
npm run lint      # ESLint v9 config

License

Apache-2.0