Skip to main content
Deno 2 is finally here 🎉️
Learn more

deno_text_indent

tag Build Status license

Sets the length of empty space (indentation) that is put before lines of text in a block.

Usage

import indent from 'https://deno.land/x/text_indent/mod.ts';

indent('Lorem ipsum dolor sit amet,\nconsectetur adipisicing elit,\nsed do eiusmod tempor incididunt.', 2);

Results in:

  Lorem ipsum dolor sit amet,
  consectetur adipisicing elit,
  sed do eiusmod tempor incididunt.

Example

deno run https://deno.land/x/text_indent/example.ts

License

deno_text_indent is released under the MIT License. See the bundled LICENSE file for details.