</>PackageGraphPackageGraph

ansi-fragments

npmv0.2.1

A tiny library with builders to help making logs/CLI pretty with a nice DX.

Not recommended for new projects

No — ansi-fragments should not be adopted for new projects. Last published 2664 days ago.

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

    No download data reported for this package yet.

  • FMaintenance: grade F, Failing.

    Last published 2664 days ago.

  • AWeight: grade A, Excellent.

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

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • 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 ansi-fragments to a project.

3
Direct dependencies

Runtime packages this one declares itself.

3
Total installed

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

46 KB
Install size

Unpacked size of this package plus its entire runtime tree.

1
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 ansi-fragments, not just its own. Check this before a legal review, not after.

Compatibility

Node.js
No constraint declared
Module format
CommonJS only
TypeScript
No bundled types
Install scripts
None

Quick start

A usage example from the ansi-fragments README.

import { color, modifier, pad, container } from 'ansi-fragments';

const prettyLog = (level, message) => container(
  color('green', modifier('italic', level)),
  pad(1),
  message
).build();

console.log(prettyLog('success', 'Yay!'));

ansi-fragments vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
ansi-fragmentsthis page01MIT7 years ago
supports-hyperlinks35.1M1MIT20 hours ago
string-width03MIT20 hours ago
yargs228.7M12MIT21 hours ago
log-symbols93.2M1MIT20 hours ago
ora80.1M6MIT21 hours ago

Dependencies

Declared by ansi-fragments v0.2.1. Runtime dependencies are installed with the package; dev dependencies are not.

Runtime (3)

colorette ^1.0.7slice-ansi ^2.0.0strip-ansi ^5.0.0

Dev (9)

@callstack/tslint-config ^0.1.0@types/jest ^23.3.13@types/slice-ansi ^2.0.0@types/strip-ansi ^3.0.0del-cli ^1.1.0jest ^24.0.0ts-jest ^23.10.5tslint ^5.12.0typescript ^3.2.2

Used by

Popular packages that depend on ansi-fragments.

Relationship graph

Dependencies (left) and dependents (right) of ansi-fragments.

colorettelogkittyansi-fragments
ansi-fragments dependencies dependents

Frequently installed together

Release history

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

Recent versions of ansi-fragments
VersionPublishedSizeLicense
0.2.1latest7 years ago29 KBMIT
0.1.17 years ago24 KBMIT
0.2.07 years ago33 KBMIT
0.1.07 years ago20 KBMIT

Overview

ansi-fragments is an npm package that a tiny library with builders to help making logs/CLI pretty with a nice DX. It has 1 known dependents in the graph. The latest version is 0.2.1, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need a tiny library with builders to help making logs/CLI pretty with a nice DX and value a focused solution.

When not to use it

Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.

Pros

  • Clear open-source license (MIT).

Cons

  • No bundled TypeScript types (may require a separate @types package).

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

Maintainers

Keywords

Frequently asked questions

Should I use ansi-fragments?

No — ansi-fragments should not be adopted for new projects. Last published 2664 days ago.

How do I install ansi-fragments?

Run `npm install ansi-fragments` to add ansi-fragments to your npm project.

How many dependencies does ansi-fragments have?

ansi-fragments declares 12 direct dependencies and pulls in 3 packages in total once its runtime tree is resolved totalling about 46 KB on disk.

What license is ansi-fragments released under?

ansi-fragments is distributed under the MIT license.

How popular is ansi-fragments?

npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on ansi-fragments.

Is ansi-fragments still maintained?

The most recent release of ansi-fragments (v0.2.1) was published 7 years ago.

Does ansi-fragments run install scripts?

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