outdent
- Version 0.8.0
- Published
- 42.9 kB
- No dependencies
- MIT license
Install
npm i outdent
yarn add outdent
pnpm add outdent
Overview
Remove leading indentation from ES6 template literals.
Index
Variables
variable defaultOutdent
const defaultOutdent: Outdent;
variable outdent
const outdent: Outdent;
Interfaces
interface Options
interface Options {}
property newline
newline?: string | null;
Normalize all newlines in the template literal to this value.
If
null
, newlines are left untouched.Newlines that get normalized are '\r\n', '\r', and '\n'.
Newlines within interpolated values are *never* normalized.
Although intended for normalizing to '\n' or '\r\n', you can also set to any string; for example ' '.
property trimLeadingNewline
trimLeadingNewline?: boolean;
property trimTrailingNewline
trimTrailingNewline?: boolean;
interface Outdent
interface Outdent {}
method string
string: (str: string) => string;
Remove indentation from a string
call signature
(strings: TemplateStringsArray, ...values: Array<any>): string;
Remove indentation from a template literal.
call signature
(options: Options): Outdent;
Create and return a new Outdent instance with the given options.
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (15)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/outdent
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/outdent)
- HTML<a href="https://www.jsdocs.io/package/outdent"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3723 ms. - Missing or incorrect documentation? Open an issue for this package.