Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101797024
readme.md
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Feb 13, 19:28
Size
750 B
Mime Type
text/x-Algol68
Expires
Sat, Feb 15, 19:28 (2 d)
Engine
blob
Format
Raw Data
Handle
24228970
Attached To
R2664 SHRINE MedCo Fork
readme.md
View Options
#
redent
[![
Build
Status
](
https
:
//travis-ci.org/sindresorhus/redent.svg?branch=master)](https://travis-ci.org/sindresorhus/redent)
>
[
Strip
redundant
indentation
](
https
:
//github.com/sindresorhus/strip-indent) and [indent the string](https://github.com/sindresorhus/indent-string)
##
Install
```
$
npm
install
--
save
redent
```
##
Usage
```
js
const
redent
=
require
(
'
redent
'
);
redent
(
'
\
n
foo
\
n
bar
\
n
'
,
1
);
//=> '\n foo\n bar\n'
```
##
API
###
redent
(
input
,
[
count
],
[
indent
])
####
input
Type
:
`string`
####
count
Type
:
`number`
Default
:
`0`
How
many
times
you
want
`indent`
repeated
.
####
indent
Type
:
`string`
Default
:
`' '`
The
string
to
use
for
the
indent
.
##
License
MIT
©
[
Sindre
Sorhus
](
http
:
//sindresorhus.com)
Event Timeline
Log In to Comment