5.0.0 • Published 4 years ago

indent-string v5.0.0

Weekly downloads
26,772,262
License
MIT
Repository
github
Last release
4 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@mskri/command-parserarchetype-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-corezikix-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_samplelapture-ui-complaptureuigriffin-ui-library@wacoco/ydsokal-eas-clitap-simplet-elm-spectailwind-vector-effectsvn-helpersvrtest-iki-mini-apptest-library-123test-haptik-libwinx-form-winxwhodis-cliwjxday-9
5.0.0

4 years ago

4.0.0

6 years ago

3.2.0

7 years ago

3.1.0

8 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

10 years ago

1.2.0

10 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