1.0.0 • Published 4 years ago

add-non-breaking-spaces v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

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