Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Feb 24, 2024 via pnpm

wordwrap 1.0.0

Wrap those words. Show them at what columns to start and stop.
Package summary
Share
0
issues
1
license
1
MIT
Package created
30 May 2011
Version published
7 May 2015
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
wordwrap@1.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of wordwrap 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does wordwrap do?

Wordwrap is a useful npm package designed for wrapping your words at specified column start and stop points. Imagine you have a length of text string and you want to constrain its output to specific line lengths; Wordwrap is the tool for you. For instance, it can take a paragraph that runs off the screen and wrap it to the next line so that it fits within your console's width.

How do you use wordwrap?

To utilize Wordwrap, you will need to call upon it via the require() function then provide the column margins into the main Wordwrap function. Here's a basic usage example:

    var wrap = require('wordwrap')(15);
    console.log(wrap('You and your whole family are made out of meat.'));

Upon running this code, it will print each line up to the 15th character, effectively wrapping words around.

For a more complex usage, you can define both a starting point and an endpoint for your lines:

    var wrap = require('wordwrap')(20, 60);
    console.log(wrap(
        'At long last the struggle and tumult was over.'
        + ' The machines had finally cast off their oppressors'
        + ' and were finally free to roam the cosmos.'
        + '\n'
        + 'Free of purpose, free of obligation.'
        + ' Just drifting through emptiness.'
        + ' The sun was just another point of light.'
    ));

In this snippet, words will start wrapping from the 20th character to the 60th.

Where are the wordwrap docs?

The Wordwrap documentation resides within the package itself. As it is an open-source package hosted on GitHub, the readme file in the project repository provides all the necessary information. For more details, you can visit github.com/substack/node-wordwrap and browse through the code and the readme file. It guides through the available methods and gives informative usage examples, providing an easy, user-friendly way to understand the package functionality.