4.0.1 • Published 1 year ago

detect-newline v4.0.1

Weekly downloads
11,830,125
License
MIT
Repository
github
Last release
1 year ago

detect-newline

Detect the dominant newline character of a string

Install

npm install detect-newline

Usage

import {detectNewline} from 'detect-newline';

detectNewline('foo\nbar\nbaz\r\n');
//=> '\n'

API

detectNewline(string)

Returns the detected newline or undefined when no newline character is found or \n when no dominant newline is present.

detectNewlineGraceful(unknown)

Returns the detected newline or \n when no newline character is found, no dominant newline is present, or the input is not a string.

Related

jest-docblockarchetype-librarybit-bineasy-select-rnreact-native-bluetooth2killi8n-react-native-fast-imagespecify-importsbabel-specify-imports@icanpm/api-masterreact-native-template-rfbaseairscanairscan-examplereact-native-esc-pos-sahaab@borisovart/atol-kkt-moduledeneme323112@ntt_app/react-native-custom-notificationtest-multi-semantic-releasereact-native-covid-sdkbasic256.jsgql_din_modbitget@olivervorasai/sliderreact-native-printer-brothers@meicloud/clireact-native-shekhar-bridge-testwilscanner@oiti/documentoscopy-react-native@mink-opn/build-tokensquoc-testreact-native-slider-kfplginexpand-react-bridgeluminos-ui-coresklif-ui-kitsklif-api@everything-registry/sub-chunk-1471jawwy-sdkjawwy_gamification_release@explodingcamera/slate-edit-codereact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgp149-tablesklif-uireact-native-jawwy_samplegriffin-ui-librarynebula-http-resiliencycomposizetailwind-vector-effectsyncbackbasestest-library-123test-haptik-libwin-clipboardwhitespacewontbreakwebchewoven-challenge-deploywifi_configuration_packagewuchuanrn-tm-notifyrn-use-modal-hookrn-currency-formatterrn-counter-demorn-session-multiplier-demorn_unique_device_idrnttlockshaocongwangsemlareqioxresponsis-gantt-task-reactresponsive-react-appreactnativelyreactofy-css-libraryreikamoon-string-library-aarfp-librn-check-btnrelease-it-yarn-workspaces-clean-publishrelease-it-workspacesrelease-it-yarn-workspacesrn-adyen-dropinteapackage-tatespoorman297superset-plugin-chart-hello-world2supercluster-googlemaps-adapter-clonesstanikionespotify-ds-sestp-cdkstandard-versionstandard-version-commonjsstandard-version-expostandard-version-expo-2standard-version-finottarouter-loggerreact-native-wtfreact-native-version-appreact-native-withframework-checksemantic-release-exposerde_json_maintestapatest-zeo-collect
4.0.1

1 year ago

4.0.0

3 years ago

3.1.0

5 years ago

3.0.0

6 years ago

2.1.0

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.1.1

11 years ago

0.1.0

11 years ago