https://github.com/jonschlinkert/change-indent
Change the indentation in a string.
https://github.com/jonschlinkert/change-indent
indent indentation javascript nodejs spaces string tabs
Last synced: about 1 year ago
JSON representation
Change the indentation in a string.
- Host: GitHub
- URL: https://github.com/jonschlinkert/change-indent
- Owner: jonschlinkert
- License: mit
- Created: 2014-08-11T08:57:42.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2021-04-16T20:05:08.000Z (about 5 years ago)
- Last Synced: 2025-05-08T04:55:11.526Z (about 1 year ago)
- Topics: indent, indentation, javascript, nodejs, spaces, string, tabs
- Language: JavaScript
- Homepage: https://github.com/jonschlinkert
- Size: 160 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# change-indent [](http://badge.fury.io/js/change-indent)
> Change the indentation in a string.
## Install
#### Install with [npm](npmjs.org):
```bash
npm i change-indent --save-dev
```
## Usage
```js
var changeIndent = require('change-indent');
change(string, indent);
```
* `string` **{String}** pass the string you want to re-indent
* `indent` **{Number}** the amount of indentation
**Example:**
```js
var changeIndent = require('change-indent');
change(' abc', 4);
//=> ' abc'
```
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 11, 2014._