</>PackageGraphPackageGraph

indent-string

npmv5.0.0

Indent each line in a string

Not recommended for new projects

No — indent-string should not be adopted for new projects. Last published 1971 days ago.

  • AAdoption: grade A, Excellent.

    94M downloads per week and 2 known dependents.

  • FMaintenance: grade F, Failing.

    Last published 1971 days ago.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 4.6 KB installed.

  • 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 indent-string to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

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

4.6 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
node >=12
Module format
ESM only
TypeScript
No bundled types
Install scripts
None

Quick start

A usage example from the indent-string README.

import indentString from 'indent-string';

indentString('Unicorns\nRainbows', 4);
//=> '    Unicorns\n    Rainbows'

indentString('Unicorns\nRainbows', 4, {indent: '♥'});
//=> '♥♥♥♥Unicorns\n♥♥♥♥Rainbows'

indent-string vs the alternatives

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

PackageWeekly downloadsDependentsLicenseLast release
indent-stringthis page94M2MIT5 years ago
index-to-position01MIT16 hours ago
camelcase95.7M2MIT14 hours ago
word-wrap93.2M1MIT15 hours ago
get-east-asian-width69.3M1MIT18 hours ago
decamelize62.6M4MIT14 hours ago

Dependencies

Declared by indent-string v5.0.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (3)

ava ^3.15.0tsd ^0.14.0xo ^0.38.2

Used by

Popular packages that depend on indent-string.

Relationship graph

Dependencies (left) and dependents (right) of indent-string.

meowredentindent-string
indent-string dependencies dependents

Frequently installed together

Release history

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

Recent versions of indent-string
VersionPublishedSizeLicense
5.0.0latest5 years ago4.6 KBMIT
4.0.07 years ago4.3 KBMIT
3.2.09 years agoMIT
3.1.09 years agoMIT
3.0.010 years agoMIT
2.1.011 years agoMIT
2.0.011 years agoMIT
1.2.211 years agoMIT
1.2.111 years agoMIT
1.2.012 years agoMIT
1.1.012 years agoMIT
1.0.012 years agoMIT
0.1.312 years agoMIT
0.1.212 years agoMIT
0.1.112 years agoMIT

Overview

indent-string is an npm package that indent each line in a string. It is extremely widely used, with about 94M downloads per week and 2 known dependents in the graph. The latest version is 5.0.0, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need indent each line in a string and value a battle-tested, widely-adopted 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

  • Large, well-established user base (94M weekly downloads).
  • Clear open-source license (MIT).
  • Lean dependency tree (3 direct dependencies).

Cons

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

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

Maintainers

Keywords

Funding

Frequently asked questions

Should I use indent-string?

No — indent-string should not be adopted for new projects. Last published 1971 days ago.

How do I install indent-string?

Run `npm install indent-string` to add indent-string to your npm project.

What license is indent-string released under?

indent-string is distributed under the MIT license.

How popular is indent-string?

indent-string has approximately 94,044,982 downloads per week and 2 known dependent packages.

Is indent-string still maintained?

The most recent release of indent-string (v5.0.0) was published 5 years ago.

Does indent-string run install scripts?

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