1.0.1 • Published 4 years ago

min-indent v1.0.1

Weekly downloads
6,342,420
License
MIT
Repository
github
Last release
4 years ago

min-indent Build Status

Get the shortest leading whitespace from lines in a string

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

Useful for removing redundant indentation.

Install

$ npm install --save min-indent

Usage

const minIndent = require('min-indent');

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

minIndent(str); // 1

Related

License

MIT © James Kyle

strip-indentarchetype-library@graphql-codegen/java-commoneasy-select-rnreact-native-bluetooth2killi8n-react-native-fast-imagespecify-importsbabel-specify-importsairscanairscan-examplereact-native-esc-pos-sahaab@borisovart/atol-kkt-module@frxf/frxfdeneme323112@texttree/demo-bsa-reference-rcl@ntt_app/react-native-custom-notificationreact-native-covid-sdk@jttechnic/interpreter@olivervorasai/slidermysql-formatreact-native-printer-brothersreact-native-shekhar-bridge-testcogoportutils@oiti/documentoscopy-react-native@mink-opn/build-tokensquoc-test@infinitebrahmanuniverse/nolb-min-@saaspe/componentsexpand-react-bridgeopea-bootstraapluminos-ui-coresklif-ui-kitsklif-api@everything-registry/sub-chunk-2170iqra-calculatorjawwy-sdkjawwy_gamification_release@314oner_npm/universal-components-libraryreact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgsklif-ui@mediakular/svelte-data-gridreact-native-jawwy_sample@geeky-apo/react-native-advanced-clipboardl2forlernahong1-utilskhaled-salem-custom-componentsgogency-test-2gogencylapture-ui-complaptureuijahancli_calculatorjamuskalimjordy-frijters-test-libmyapp_rands_testnka-gantt-task-reactmicroend-componentjrennsoh88-react-native-scroll-indicatornative-date-picker-modulenative-modal-damage-vehiclenative-kakao-loginnative-google-loginnative-apple-loginmy-library-buttonneural_compressor_ext_lab_customizedneural_compressor_ext_lab_customized_2new-awesome-4321luojia-cli-devmama-exporter@podlubnaja/ui-kit@positionex/position-sdk@praella/localisationistnovacap-componentsnpm_qwertynpm_one_12_34_1_npm_one_1_2_3npm_one_2_2md-vditorjawwy_library_newjawy_library_v1gamification-jawwy-libraryframework_test_library_sixdee_new_jawwyibraz-calculatorzzzxxxyyy321123@bee-icons/qwikeditor.js-custom-multiple-selectededitorjs_forkedec0lint-style-config-postcssemr-tabulator-tableseasyplayer-myes-react-bridgefluent.adflow.reactnativesdkfluent.adflow.reactnativesdk-alphafront-end-engineeringfront-and-backgaurav-react-native-loopgriffin-ui-libraryhaidercalx
1.0.1

4 years ago

1.0.0

6 years ago