Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

redent

Package Overview
Dependencies
2
Maintainers
1
Versions
4
Issues
File Explorer

Advanced tools

redent

Strip redundant indentation and indent the string

    4.0.0latest

Version published
Maintainers
1
Weekly downloads
16,592,229
decreased by-9.58%

Weekly downloads

Changelog

Source

Breaking

  • Require Node.js 12 3f91c57
  • This package is now pure ESM. Please read this.

https://github.com/sindresorhus/redent/compare/v3.0.0...v4.0.0

Readme

Source

redent

Strip redundant indentation and indent the string

Install

$ npm install redent

Usage

import redent from 'redent'; redent('\n foo\n bar\n', 1); //=> '\n foo\n bar\n'

API

redent(string, count?, options?)

string

Type: string

The string to normalize indentation.

count

Type: number
Default: 0

How many times you want options.indent repeated.

options

Type: object

indent

Type: string
Default: ' '

The string to use for the indent.

includeEmptyLines

Type: boolean
Default: false

Also indent empty lines.


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Keywords

FAQs

What is redent?

Strip redundant indentation and indent the string

Is redent popular?

The npm package redent receives a total of 12,736,849 weekly downloads. As such, redent popularity was classified as popular.

Is redent well maintained?

We found that redent demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 03 May 2021

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc