Wondering what’s next for npm?Check out our public roadmap! »

    minimum-raggedness-wordwrap

    0.0.1 • Public • Published

    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
    */
    
    

    Install

    npm i minimum-raggedness-wordwrap

    DownloadsWeekly Downloads

    2

    Version

    0.0.1

    License

    ISC

    Last publish

    Collaborators

    • avatar