1.0.1 • Published 5 years ago

min-indent v1.0.1

Weekly downloads
6,342,420
License
MIT
Repository
github
Last release
5 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-libraryeasy-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_releasereact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgsklif-ui@mediakular/svelte-data-gridreact-native-jawwy_samplelapture-ui-complaptureuigriffin-ui-library@wacoco/ytailwind-vector-effectsvelte-searchable-selectsvelvet-customtest-iki-mini-apptest-library-123test-haptik-libwinx-form-winxweb-elements-iconswrenchnpm-ui-componentswifi_configuration_packagesui-monorepotesting-storybooktest-zeo-collectsvavatarsvelte-component-libsvelte-crypt-textsweetalert2-denazificationvishwanaathh4_dbvishwanaathh4_db1vishwanaathh4_db2vishwanaathh4_dbbvision-camera-plugin-face-detectorvision-camera-plugin-scan-facesvision-camera-base64-resizedvantiq-react@dotconf-pro/dotconf-pro@dotconf-pro/dotenv@digitalrakesh/jsui@dimcheify/dimui@cristianps1988/ds-template@cs6/react-native-test-native-view-library@con-test/react-native-concent-common@damruravihara/react-native-testing-package@corelmax/react-native-my2c2p-sdk@bolt/stylelint-config@blkmarketco/components-library@praella/localisationist@positionex/position-sdkcauseway-concrete-stylesjahancli_calculatorip-designjrennsoh88-react-native-scroll-indicatorjs-snippet-libraryjesh-calculationjnf-accesscontrol-rnttljordy-frijters-test-libjamuskalimk0ng_d1nosaur_quenak0ng_d1nosaur_quenbk0ng_d1nosaur_quenck0ng_d1nosaur_quendk0ng_d1nosaur_quenek0ng_d1nosaur_quenf
1.0.1

5 years ago

1.0.0

8 years ago