</>PackageGraphPackageGraph

pretty-format

npmv30.5.1TypeScript

Stringify any JavaScript value.

Safe to adopt

Yes — pretty-format scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 9 days ago. 16 releases in the last 2 years.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • AMaintenance: grade A, Excellent.

    Last published 9 days ago. 16 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Pulls in 5 transitive packages, about 91 KB installed (at least — some of the tree is still being crawled).

  • ASupply chain: grade A, Excellent.

    No install scripts, 5 maintainers, and a contained dependency surface.

  • ALicense: grade A, Excellent.

    MIT — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding pretty-format to a project.

4
Direct dependencies

Runtime packages this one declares itself.

5
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

91 KB
Install size

Unpacked size of this package plus its entire runtime tree.

2
Tree depth

Longest resolved dependency chain below this package.

Part of this dependency tree has not been crawled yet, so these figures are a lower bound rather than a final total.

Licenses in the dependency tree

MIT

Every license you inherit by installing pretty-format, not just its own. Check this before a legal review, not after.

Compatibility

Node.js
node ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0
Module format
ESM + CommonJS
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the pretty-format README.

const {format: prettyFormat} = require('pretty-format'); // CommonJS

Dependencies

Declared by pretty-format v30.5.1. Runtime dependencies are installed with the package; dev dependencies are not.

Runtime (4)

@jest/react-is-18 npm:react-is@^18.3.1@jest/react-is-19 npm:react-is@^19.2.5@jest/schemas 30.5.0ansi-styles ^5.2.0

Dev (13)

@types/react ^19.2.18@types/react-is ^19.0.0@types/react-test-renderer ^19.1.0immutable ^5.1.2jest-util 30.5.1react ^19.2.3react-17 npm:react@^17.0.2react-18 npm:react@^18.3.1react-19 npm:react@^19.2.3react-test-renderer ^19.2.3react-test-renderer-17 npm:react-test-renderer@^17.0.2react-test-renderer-18 npm:react-test-renderer@^18.3.1react-test-renderer-19 npm:react-test-renderer@^19.2.3

Used by

Popular packages that depend on pretty-format.

jest-message-utilnpm

No description provided.

75.7M/wk9 dependentsMITTS
@testing-library/jest-domnpm

Custom jest matchers to test the state of the DOM

56M/wk6 dependentsMITTS
jest-validatenpm

Generic configuration validation tool that helps you with warnings, errors and deprecation messages as well as showing users examples of correct configuration.

52.7M/wk6 dependentsMITTS
webpacknpm

Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.

49.8M/wk29 dependentsMITTS
jest-eachnpm

Parameterised tests for Jest

33.7M/wk1 dependentsMITTS
exponpm

The Expo SDK

0/wk18 dependentsMITTS
react-nativenpm

A framework for building native apps using React

0/wk30 dependentsMIT
jest-diffnpm

Display differences clearly so people can review changes confidently.

0/wk7 dependentsMITTS
jest-matcher-utilsnpm

A set of utility functions for expect and related packages

0/wk6 dependentsMITTS
jest-circusnpm

[type-definitions]: https://github.com/jestjs/jest/blob/main/packages/jest-types/src/Circus.ts

0/wk2 dependentsMITTS
jest-leak-detectornpm

Module for verifying whether an object has been garbage collected or not.

0/wk2 dependentsMITTS
@expo/clinpm

The Expo CLI

0/wk2 dependentsMIT
@expo/metro-runtimenpm

Tools for making advanced Metro bundler features work

0/wk3 dependentsMITTS
metro-confignpm

🚇 Config parser for Metro.

0/wk4 dependentsMITTS
@testing-library/react-nativenpm

Simple and complete React Native testing utilities that encourage good testing practices.

0/wk10 dependentsMITTS
@react-native-community/cli-server-apinpm

No description provided.

0/wk1 dependentsMITTS
babel-plugin-react-compilernpm

Babel plugin for React Compiler.

0/wk2 dependentsMITTS
@jest/corenpm

Delightful JavaScript Testing.

0/wk2 dependentsMITTS
jest-snapshotnpm

No description provided.

0/wk7 dependentsMITTS
jest-confignpm

No description provided.

0/wk2 dependentsMITTS

Relationship graph

Dependencies (left) and dependents (right) of pretty-format.

Frequently installed together

Release history

16 releases in the last two years, typically about 18 days apart.

Recent versions of pretty-format
VersionPublishedSizeLicense
30.5.1latest9 days ago60 KBMIT
30.5.012 days ago60 KBMIT
30.4.14 months ago60 KBMIT
30.4.04 months ago60 KBMIT
30.3.06 months ago59 KBMIT
30.2.011 months ago62 KBMIT
30.0.51 year ago62 KBMIT
30.0.21 year ago59 KBMIT
30.0.11 year ago59 KBMIT
30.0.01 year ago59 KBMIT
30.0.0-rc.11 year ago59 KBMIT
30.0.0-beta.81 year ago59 KBMIT
30.0.0-beta.71 year ago59 KBMIT
30.0.0-beta.61 year ago59 KBMIT
30.0.0-beta.31 year ago59 KBMIT

Overview

pretty-format is an npm package that stringify any JavaScript value. It has 20 known dependents in the graph. The latest version is 30.5.1, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need stringify any JavaScript value and value a focused solution.

When not to use it

Consider an alternative if you need to minimize your dependency tree, or if a more actively-maintained option better fits your npm stack.

Pros

  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).

Cons

  • Large dependency tree (17 direct dependencies) increases install size and audit surface.

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Frequently asked questions

Should I use pretty-format?

Yes — pretty-format scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 9 days ago. 16 releases in the last 2 years.

How do I install pretty-format?

Run `npm install pretty-format` to add pretty-format to your npm project.

How many dependencies does pretty-format have?

pretty-format declares 17 direct dependencies and pulls in 5 packages in total once its runtime tree is resolved totalling about 91 KB on disk.

What license is pretty-format released under?

pretty-format is distributed under the MIT license.

How popular is pretty-format?

npm does not publish download counts. Within PackageGraph's crawl, 20 known packages depend on pretty-format.

Is pretty-format still maintained?

The most recent release of pretty-format (v30.5.1) was published 9 days ago.

Does pretty-format run install scripts?

No. pretty-format does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.