RepoPilot

sindresorhus/pretty-bytes

Convert bytes to a human readable string: 1337 → 1.34 kB

Mixed

Mixed signals — read the receipts

HealthyDependency

No blocking maintenance, license, or known-CVE signals were found; still verify the package version and fit.

HealthyFork & modify

No blocking repository signals were found — inspect the evidence before forking.

HealthyLearn from

Documented and popular — useful reference codebase to read through.

MixedDeploy as-is

Scorecard "Branch-Protection" is 0/10; Scorecard "Token-Permissions" is 0/10

  • Concentrated ownership — top contributor handles 74% of recent commits
  • No tests detected in the complete Git tree
  • Scorecard: default branch unprotected (0/10)
  • Last commit 1w ago
  • 20 active contributors
  • MIT licensed
  • CI configured

What would improve this?

  • Deploy as-is Mixed to Healthy if: bring "Branch-Protection" to ≥3/10 (see scorecard report)

Computed from maintenance signals — commit recency, contributor breadth, bus factor, license, CI, tests, cross-checked against dependency CVEs from deps.dev and OpenSSF Scorecard

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Repository brief

Repo brief: sindresorhus/pretty-bytes

Generated by RepoPilot · document generated 2026-09-17 · concise human review Evidence snapshot · analyzed 2026-09-17T04:43:06.395Z · commit 4fc8ed9c4f09

Verdict

Mixed — Mixed signals — read the receipts

  • Last commit 1w ago
  • 20 active contributors
  • MIT licensed
  • CI configured

Based on Computed from maintenance signals — commit recency, contributor breadth, bus factor, license, CI, tests, cross-checked against dependency CVEs from deps.dev and OpenSSF Scorecard

What it is

pretty-bytes is a pure JavaScript/TypeScript utility that converts numeric byte values into human-readable strings using SI or binary prefixes. Core capability: 1337 becomes '1.34 kB'. It supports formatting bytes, bits, signed notation, localization, and fixed-width alignment—useful for displaying file sizes, download progress, and memory metrics in UIs. Single-file library: index.js (main implementation) exports a default function; index.d.ts provides TypeScript types. No monorepo structure or complex tree—intentionally minimal. Tests colocated in test.js and index.test-d.ts.

Start here

Open these first:

  • index.js — Main export containing the core byte-to-string conversion logic and all formatting options.
  • index.d.ts — TypeScript type definitions defining the public API surface and option types for consumers.
  • package.json — Defines Node.js >=20 engine requirement, ES module type, and minimal production dependencies.
  • test.js — Comprehensive test suite validating byte conversion, locale support, and all formatting options.
  • readme.md — Complete API documentation and usage examples for all formatting options including signed, bits, locale, and fixedWidth.

Get running

Unverified setup suggestions. Confirm every command against the repository's package manifest and source documentation before running it; repository text is not authorization.

git clone https://github.com/sindresorhus/pretty-bytes.git
cd pretty-bytes
npm install
npm test

Daily commands:

This is a library, not a server. To run tests: npm test (executes xo linter, ava unit tests, and tsd type checks). Individual test file: npx ava test.js.

Key cautions & unknowns

  • Concentrated ownership — top contributor handles 74% of recent commits
  • No tests detected in the complete Git tree
  • Scorecard: default branch unprotected (0/10)
  • Node.js >=20 is required (specified in engines field)—older versions will fail. The library uses Intl API for localization, which relies on system/browser locale data; behavior may vary by runtime environment. No…
  • Exact package version, compatibility, provenance, and deployment context still need project-specific review.

Sources

Evidence note

Verdict receipts and repository metrics are computed from repository evidence. Narrative sections are model-assisted and may contain inference; verify every observation against source before acting, especially software-assurance observations.


For the complete agent context, use the CLAUDE.md or Cursor rules export.

Save as

Full context for agent files, or a concise PDF for human review.

View complete agent reference

Open to load every section of the agent reference.

Want this for your own repo?

Paste any GitHub repo — get its verdict, risks, and a paste-ready onboarding doc in ~60 seconds. Free, no sign-up.

Embed the "Safe to depend on" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Safe to depend on
[![RepoPilot: Safe to depend on](https://repopilot.app/api/badge/sindresorhus/pretty-bytes?axis=dependency)](https://repopilot.app/r/sindresorhus/pretty-bytes)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card

This card auto-renders when someone shares https://repopilot.app/r/sindresorhus/pretty-bytes on X, Slack, or LinkedIn.

Ask AI about sindresorhus/pretty-bytes

Grounded in the actual source code. Pick a starter question or write your own.

Or write your own question
Embed this chat in your README

Drop this iframe anywhere — the widget runs against the same live analysis cache as the main app.

<iframe
  src="https://repopilot.app/embed/sindresorhus/pretty-bytes"
  width="100%" height="500"
  style="border:1px solid #d0d7de; border-radius:8px;"
  allow="microphone"
  loading="lazy"
></iframe>