ansi-fragments
npmv0.2.1A 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.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
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
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.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| ansi-fragmentsthis page | 0 | 1 | MIT | 7 years ago |
| supports-hyperlinks | 35.1M | 1 | MIT | 20 hours ago |
| string-width | 0 | 3 | MIT | 20 hours ago |
| yargs | 228.7M | 12 | MIT | 21 hours ago |
| log-symbols | 93.2M | 1 | MIT | 20 hours ago |
| ora | 80.1M | 6 | MIT | 21 hours ago |
Dependencies
Declared by ansi-fragments v0.2.1. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (3)
Dev (9)
Used by
Popular packages that depend on ansi-fragments.
Relationship graph
Dependencies (left) and dependents (right) of ansi-fragments.
Frequently installed together
TypeScript definitions for node
yargs the modern, pirate-themed, successor to optimist.
An AST-based pattern checker for JavaScript.
Babel preset for TypeScript.
TypeScript definitions for yargs
2KB immutable date time library alternative to Moment.js with the same modern API
Jest plugin to use babel for transformation.
Delightful JavaScript Testing.
Release history
No releases in the last two years, typically about 18 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 0.2.1latest | 7 years ago | 29 KB | MIT |
| 0.1.1 | 7 years ago | 24 KB | MIT |
| 0.2.0 | 7 years ago | 33 KB | MIT |
| 0.1.0 | 7 years ago | 20 KB | MIT |
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
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.