elrh-pslo
TypeScript icon, indicating that this package has built-in type declarations

1.1.6 • Public • Published

elrh-pslo

Text-enhancement function to prevent single letter words and other special symbols and abbreviations being orphaned at the end of the wrapped line.

The "pslo" abbreviation stands for Prevent Single Letter Orphans, which is also the name of the core function provided by this micro-library.

how to use

npm instal elrh-pslo to include into your project.

Use preventSingleLetterOrphans to treat your text inputs. The function will include non-breaking spaces represented as \xa0 unicode characters based on various rules.

const input: string = "Text with single letter words like a or i or symbols like % and various others."
const output: string = preventSingleLetterOrphans(input)

tech stack

report bugs & contact

Use GitHub issues to report bugs / propose enhancements / give feedback: https://github.com/AloisSeckar/elrh-pslo/issues

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.63latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.63
1.1.50
1.1.40
1.1.30
1.1.20
1.1.10
1.1.00
1.0.10
1.0.00

Package Sidebar

Install

npm i elrh-pslo

Weekly Downloads

3

Version

1.1.6

License

none

Unpacked Size

5.52 kB

Total Files

8

Last publish

Collaborators

  • ellrohir