@simmo/widower
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

Widower

npm downloads

Often when working with responsive designs, text will wrap leaving a widowed word on a new line. This JavaScript function replaces the last space with a non breaking space.

Install

npm i @simmo/widower

Usage

import widower from 'widow-killer';

widower('Hello world');
// => Hello\u00A0world

MIT © Mike Simmonds

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.2
    21
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.2
    21
  • 1.0.2
    2
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @simmo/widower

Weekly Downloads

23

Version

1.1.2

License

MIT

Unpacked Size

3.74 kB

Total Files

7

Last publish

Collaborators

  • simmo