Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@alloc/change-indent

Change the indentation in a string.

change, code, detect, format, formatter, formatting, identify, indent, indentation, indentations, indented, line, normalize, pad, paragraph, re-format, re-indent, reformat, reindent, remove, source, space, str, string, strip, tab, text, text-indent, un-indent, unindent, whitespace

readme

change-indent NPM version

Change the indentation in a string.

Install

Install with npm:

npm i change-indent --save-dev

Usage

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:

var changeIndent = require('change-indent');
change('  abc', 4);

//=> '    abc'

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license


This file was generated by verb-cli on August 11, 2014.