indent

Indents a string.

MIT 3 个版本
安装
npm install indent
yarn add indent
pnpm add indent
bun add indent
README

Indent

Build Status NPM version NPM license

Indent a string.

Install

npm install indent

Usage

var indent = require('indent');

indent('hello\nworld', 2);
// "  hello\n  world"

indent('hello\nworld', '  ');
// "  hello\n  world"

indent('hello\nworld');
// "  hello\n  world"

indent('hello\nworld', '\t');
// "\thello\n\tworld"
版本列表
0.0.2 2016-02-22
0.0.1 2014-04-28
0.0.0 2014-04-07