5.0.0 • Published 3 years ago

indent-string v5.0.0

Weekly downloads
26,772,262
License
MIT
Repository
github
Last release
3 years ago

indent-string

Indent each line in a string

Install

$ npm install indent-string

Usage

import indentString from 'indent-string';

indentString('Unicorns\nRainbows', 4);
//=> '    Unicorns\n    Rainbows'

indentString('Unicorns\nRainbows', 4, {indent: '♥'});
//=> '♥♥♥♥Unicorns\n♥♥♥♥Rainbows'

API

indentString(string, count?, options?)

string

Type: string

The string to indent.

count

Type: number\ Default: 1

How many times you want options.indent repeated.

options

Type: object

indent

Type: string\ Default: ' '

The string to use for the indent.

includeEmptyLines

Type: boolean\ Default: false

Also indent empty lines.

Related


redentaggregate-errorlistr-update-renderer@oclif/errorscli-uxcuc-gaf@prisma/internals@mskri/command-parser@prisma/migrate@prisma/engine-corearchetype-libraryatproto-event-streamscomponennentteasy-select-rnchinjowwchinjowvuedragdropuploadimagesreact-native-bluetooth2killi8n-react-native-fast-image@darrinholst/cucumber@arisageha/react-lazyloadmocha-like-gherkinutry-f-renderairscanairscan-examplepg-taskq-graphqlreadytest-testcafebb-chatreact-native-esc-pos-sahaab@borisovart/atol-kkt-module@frxf/frxf@typhonjs-oclif/helpbasedeneme323112@texttree/demo-bsa-reference-rcl@piyushmishra/critical@fundefund/funde_ck@ntt_app/react-native-custom-notificationreact-native-covid-sdk@jttechnic/interpreter@saeon/quick-formcthpb-plugin-socialfrey@daimond113/prettier-eslint@olivervorasai/slidermysql-formatpanqibaoreact-native-printer-brothers@newhorizon-tech/dd-npm-package-templatereact-native-shekhar-bridge-testcogoportutilslevibestliblevibestlib2levilibtest19levilibtest24levilibtest25levilibtest26levilibtest27levilibtest28levilibtest29@unhack/cli@oiti/documentoscopy-react-native@mink-opn/build-tokensquoc-testunblock-block-save-variables@infinitebrahmanuniverse/nolb-ind@prodam/prodam-typescclibyarntest@saaspe/componentsexpand-react-bridgeopea-bootstraapnode-gioluminos-ui-coretestcafezikix-resourcessklif-ui-kitsklif-apigatsby-theme-fencing@everything-registry/sub-chunk-1910iqra-calculatorjawwy-sdkjawwy_gamification_releasereact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkg@rabailriaz/hisaab-web-portalsklif-uireact-native-jawwy_sample@geeky-apo/react-native-advanced-clipboardka-flow.jskafirchain-tetriskwest-debugl2forlernalaboriouslib-errorliquid-language-serverliquidishlistr-better-rendererlistr-cslistr-log
5.0.0

3 years ago

4.0.0

5 years ago

3.2.0

7 years ago

3.1.0

7 years ago

3.0.0

8 years ago

2.1.0

9 years ago

2.0.0

9 years ago

1.2.2

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.0

10 years ago

1.0.0

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago