0.0.6 • Published 8 years ago
@joegesualdo/indent-string v0.0.6
indent-string
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])
Name | Type | Required | Default | Description |
---|---|---|---|---|
str | String | yes | N/A | The string you want to indent |
count | Number | no | 0 | The number of spaces you want to indent |
character | Number | no |
| The 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