Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

add-non-breaking-spaces

Useful helpers to add needed non-breaking spaces on string

helper, util, non-breaking, punctuation, spaces, string

readme

Add non-breaking spaces

Set of useful functions to handle non-breaking spaces in character strings

Available languages

  • FR (French/France)
  • EN (English) TODO

FR (French/France)

Import/require the method

// ES6 modules
import addNonBreakingSpaces from 'add-non-breaking-spaces/fr';

// node.js way
const addNonBreakingSpaces = require('add-non-breaking-spaces/fr');

Usage

const str = `
  Caius : Hé les connards ! Vous pouvez faire griller un porcelet s’il vous plaît ?
  Arthur : Les connards ?
  Léodagan : S’il vous plaît ?
`;

addNonBreakingSpaces(str);
// will return:
/*
  Caius : Hé les connards ! Vous pouvez faire griller un porcelet s’il vous plaît ?
  Arthur : Les connards ?
  Léodagan : S’il vous plaît ?
*/

License

MIT

Copyright (c) 2020-present — Antoine Demailly