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

objfuscate

v0.2.0

Published

Redacts Javascript objects

Readme

Objfuscate

build status

Redacts JSON object values recursively, and keys if desired.

Installation

npm install -g objfuscate

Usage

Usage:
   objfuscate [options] <jsonfile>
   objfuscate --version
   objfuscate -h | --help

Options:
   -h, --help           Print this help screen
   -k, --include-keys   Obfuscate keys as well
   -p, --pretty         Print the result with line breaks and indentation

Use with a JSON file

objfuscate ./sensitive.json

This will write the obfuscated JSON to stdout. In most cases, you will want to store the result in another file, which you can do like so:

objfuscate ./sensitive.json > obfuscated.json

Note: The file can be a single JSON object, a newline-delimited list of JSON objects (for example when using mongoexport without the --jsonArray option) or an array of JSON objects (for example when using mongoexport with the --jsonArray option). The output format matches the input format.

Use with JSON string

objfuscate '{"my": "secret"}'

Note: The JSON string must be wrapped in single quotes and you need to write proper JSON, which includes double quotes around key names and strings.

Value Obfuscation

Currently, only the following values are replaced:

  • Strings
  • Numbers

Values use a cache so that each value is replaced with the same random value, which is created when a particular value is first encountered. This ensures that the dataset has the same cardinality as the original.

Key Obfuscation

To replace object keys as well, use the -k or --include-keys option like so:

objfuscate -k ./paranoid.json
objfuscate --include-keys ./paranoid.json

They key cache is the same as the value cache (see above). A key named "foo" is replaced with the same new string as the value "foo".

Pretty output

(Only applicable if the input file was a single JSON object, or an array of JSON objects. Newline-delimited JSON objects are not prettified.)

Per default, the output is written compressed into a single line without whitespace. If you want the output to be nicely formatted with line breaks, whitespace and indentations, use the -p or --pretty option.

objfuscate --pretty ./documents.json > pretty-obfuscated.json

License

Apache 2.0