Socket
Socket
Sign inDemoInstall

word-wrap

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

word-wrap - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

.verb.md

8

bower.json
{
"name": "word-wrap",
"version": "0.1.3",
"version": "0.2.0",
"main": [
"index.js"
],
"authors": [
{
"name": "Jon Schlinkert",
"homepage": "http://github.com/jonschlinkert/"
}
]
}

4

index.js

@@ -17,3 +17,3 @@ /*!

var width = options.width || 50;
var indent = options.indent || ' ';
var indent = (typeof options.indent === 'undefined') ? ' ' : options.indent;
var newline = options.newline || '\n' + indent;

@@ -23,2 +23,2 @@

return indent + str.match(re).join(newline);
};
};
{
"name": "word-wrap",
"description": "Wrap words to a specified length.",
"version": "0.1.3",
"version": "0.2.0",
"homepage": "https://github.com/jonschlinkert/word-wrap",

@@ -17,18 +17,7 @@ "author": {

},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/jonschlinkert/word-wrap/blob/master/LICENSE-MIT"
}
],
"licenses": {
"type": "MIT",
"url": "https://github.com/jonschlinkert/word-wrap/blob/master/LICENSE-MIT"
},
"main": "index.js",
"keywords": [
"word-wrap",
"wrap",
"words",
"text",
"soft wrap",
"line break",
"new line"
],
"engines": {

@@ -38,7 +27,18 @@ "node": ">=0.8"

"scripts": {
"test": "mocha -R test"
"test": "mocha -R spec"
},
"devDependencies": {
"verb": "~0.2.2"
}
}
"keywords": [
"break",
"line",
"new-line",
"carriage",
"newline",
"return",
"soft",
"text",
"word",
"word-wrap",
"words",
"wrap"
]
}

@@ -1,14 +0,14 @@

# word-wrap [![NPM version](https://badge.fury.io/js/word-wrap.png)](http://badge.fury.io/js/word-wrap)
# word-wrap [![NPM version](https://badge.fury.io/js/word-wrap.svg)](http://badge.fury.io/js/word-wrap)
> Wrap words.
> Wrap words to a specified length.
## Install
Install with [npm](npmjs.org):
### Install with [npm](npmjs.org)
```bash
npm i word-wrap --save-dev
npm i word-wrap --save
```
## wrap
## wrap( str, options )
```js

@@ -21,4 +21,5 @@ var wrap = require('word-wrap');

```
Resulting in:
Results in:
```

@@ -33,3 +34,3 @@ A project without documentation is like a project

#### width
### width

@@ -48,4 +49,5 @@ Type: `Number`

#### indent
### indent
Type: `String`

@@ -63,3 +65,3 @@

#### newline
### newline

@@ -81,12 +83,13 @@ Type: `String`

**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
Copyright (c) 2014 Jon Schlinkert
Released under the , licenses
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 19, 2014._
_This file was generated by [verb](https://github.com/assemble/verb) on November 23, 2014._
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc