@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

Dependencies (0)

    Dev Dependencies (11)

    Package Sidebar

    Install

    npm i @simmo/widower

    Weekly Downloads

    10

    Version

    1.1.2

    License

    MIT

    Unpacked Size

    3.74 kB

    Total Files

    7

    Last publish

    Collaborators

    • simmo