Skip to content

pindlebot/left-indent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

left-indent

leftIndent (text, direction = 'forward', tabSize = 2) => indentedText

Examples

const { leftIndent } = require('left-indent')

leftIndent (' some text', 'forward') 
// => '  some text' 
// + 1 space

leftIndent ('  some text', 'forward')
// => + 2 spaces
// => '    some text'

leftIndent (' some text', 'backward') 
// => 'some text' 
// - 1 space

leftIndent ('  some text', 'backward')
// => - 2 spaces
// => '    some text'

leftIndent ('some text', 'backward')
// => - 0 spaces
// => 'some text'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published