Utility functions to detect the number of sentences per line in Markdown files. 📐
npm install sentences-per-lineUtility functions to enforce the number of sentences per line in Markdown files. 📐
> Looking for the ESLint, Markdownlint, or Prettier plugins to enforce sentences-per-line?
> See ../../README.md > ## Packages.
``shell`
npm i sentences-per-line
Retrieves the first index after the period of the line's first sentence, if a second sentence follows it.
This is the driving function behind enforcing one sentence per line in the sentences-per-line monorepo's packages.
`ts
import { getIndexBeforeSecondSentence } from "sentences-per-line";
// undefined
getIndexBeforeSecondSentence("The only sentence.");
// 15
getIndexBeforeSecondSentence("First sentence. Second sentence.");
``