Skip to content

GbGr/wordwrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wordwrap

Minimum raggedness wordwrap algorithm

Usage

import wordwrap from 'wordwrap';
const input = 'Alfred Aho likes to code';
const constraint = 10;
console.log(wordwrap(input, counstraint));

/**
* Current algorithm output:
*
* Alfred
* Aho likes
* to code
*/

/**
* Another greedy algorithm output:
*
* Alfred Aho
* likes to
* code
*/

About

Minimum raggedness wordwrap algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •