0.0.6 • Published 8 years ago

@joegesualdo/indent-string v0.0.6

Weekly downloads
3
License
-
Repository
github
Last release
8 years ago

indent-string Build Status

Indent a string.

Install

$ npm install --save @joegesualdo/indent-string

Usage

import indentString from '@joegesualdo/indent-string'

indentString('hello', 2);
// '  hello'

Test

$ npm test

API

indentString(str, [count], [character])

NameTypeRequiredDefaultDescription
strStringyesN/AThe string you want to indent
countNumberno0The number of spaces you want to indent
characterNumbernoThe number of spaces you want to indent
import indentString from ('@joegesualdo/indent-string')

indentString('hello', 2);
// '  hello'
indentString('hello', 2, '.');
// '..hello'

Build

$ npm run build

License

MIT © Joe Gesualdo