JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 58672356
  • Score
    100M100P100Q231189F

Wrap words.

Package Exports

  • word-wrap

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (word-wrap) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

word-wrap NPM version

Wrap words.

Install

Install with npm:

npm i word-wrap --save-dev

wrap( str, options )

var wrap = require('word-wrap');

var str = 'A project without documentation is like a project that doesn\'t exist. Verb solves this by making it dead simple to generate project documentation, using simple markdown templates, with zero configuration required.';

console.log(wrap(str));

Resulting in:

  A project without documentation is like a project
  that doesn't exist. Verb solves this by making it
  dead simple to generate project documentation,
  using simple markdown templates, with zero
  configuration required.

width

Type: Number

Default: 50

The width of the text before wrapping to a new line.

indent

Type: String

Default: (two spaces)

The string to use at the beginning of each line.

newline

Type: String

Default: \n

The string to use at the end of each line.

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license


This file was generated by verb-cli on April 22, 2014.