4.0.0 • Published 3 years ago

strip-indent v4.0.0

Weekly downloads
17,786,834
License
MIT
Repository
github
Last release
3 years ago

strip-indent

Strip leading whitespace from each line in a string

The line with the least number of leading whitespace, ignoring empty lines, determines the number to remove.

Useful for removing redundant indentation.

Install

$ npm install strip-indent

Usage

import stripIndent from 'strip-indent';

const string = '\tunicorn\n\t\tcake';
/*
	unicorn
		cake
*/

stripIndent(string);
/*
unicorn
	cake
*/

Related


redentreact-docgen@squiz/dxp-cli@prisma/internals@mskri/command-parser@prisma/migrate@prisma/sdkarchetype-libraryeasy-select-rnchinjowwchinjowreact-native-bluetooth2killi8n-react-native-fast-imagespecify-importsbabel-specify-imports@arisageha/react-lazyloadsheepskin@ianiket/react-native-docgen@ianiket/rn-docgen@moresec/ms@xinke-core/yorkie@xinke-core/ci-test-1@alotool/bloggerpackdokztestairscanairscan-examplebb-chatreact-native-esc-pos-sahaab@borisovart/atol-kkt-moduledokz-docs-3@frxf/frxfdeneme323112@texttree/demo-bsa-reference-rcl@ntt_app/react-native-custom-notificationreact-native-covid-sdk@alotool/alotool-cli@jttechnic/interpreterbluelibcthpb-plugin-socialfrey@olivervorasai/slidermysql-formatpanqibaoreact-native-printer-brothersreact-native-shekhar-bridge-testcogoportutilsfaros-canonical-reports@oiti/documentoscopy-react-native@mink-opn/build-tokensquoc-testunblock-block-save-variables@infinitebrahmanuniverse/nolb-strip@saaspe/componentsexpand-react-bridgeopea-bootstraapluminos-ui-coresklif-ui-kitsklif-api@everything-registry/sub-chunk-2837iqra-calculatorjawwy-sdkjawwy_gamification_release@langge-data/yorkie@314oner_npm/universal-components-libraryreact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgsklif-ui@mediakular/svelte-data-gridreact-native-jawwy_sampleka-flow.jskafirchain-tetrisl2forlernalicensor-clihops-lambdahops-react-apollohtmdownhexo-renderer-disable-tag-pluginshexo-renderer-marked-enhancedhexo-renderer-marked-lazyhexo-renderer-marked-lowercase-anchorshexo-renderer-math-markedhexo-renderer-moemarkhexo-renderer-moemark-pygmentshexo-renderer-kramedhexo-renderer-kramed-essencehexo-renderer-kramed-mgthexo-tag-demohexo-swaggerhexo-tabbed-code-blockhexo-tag-accordionlisthelp-widgethidden-machineholonhexo-filter-marked-highlighthexo-tag-randpaginghexo-utilhot-zone-vuehong1-utils
4.0.0

3 years ago

3.0.0

5 years ago

2.0.0

8 years ago

1.0.1

9 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