Comparing version 1.0.0 to 1.0.1
/*! | ||
* word-wrap <https://github.com/jonschlinkert/word-wrap> | ||
* | ||
* Copyright (c) 2014, Jon Schlinkert, contributors. | ||
* Licensed under the MIT License | ||
* Copyright (c) 2014-2015, Jon Schlinkert. | ||
* Licensed under the MIT License. | ||
* | ||
@@ -24,3 +24,4 @@ * Adapted from http://james.padolsey.com/javascript/wordwrap-for-javascript/ | ||
var re = new RegExp('.{1,' + width + '}(\\s|$)|\\S+?(\\s|$)', 'g'); | ||
var res = indent + str.match(re).join(newline); | ||
var lines = str.match(re) || []; | ||
var res = indent + lines.join(newline); | ||
if (options.trim === true) { | ||
@@ -27,0 +28,0 @@ res = res.replace(/[ \t]*$/gm, ''); |
{ | ||
"name": "word-wrap", | ||
"description": "Wrap words to a specified length.", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"homepage": "https://github.com/jonschlinkert/word-wrap", | ||
@@ -21,2 +21,5 @@ "author": { | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"main": "index.js", | ||
@@ -27,5 +30,6 @@ "engines": { | ||
"scripts": { | ||
"test": "mocha -R spec" | ||
"test": "mocha" | ||
}, | ||
"devDependencies": { | ||
"mocha": "^2.1.0", | ||
"should": "^4.3.0" | ||
@@ -47,2 +51,2 @@ }, | ||
] | ||
} | ||
} |
@@ -5,3 +5,2 @@ # word-wrap [![NPM version](https://badge.fury.io/js/word-wrap.svg)](http://badge.fury.io/js/word-wrap) | ||
## Install | ||
## Install with [npm](npmjs.org) | ||
@@ -105,3 +104,3 @@ | ||
## License | ||
Copyright (c) 2014 Jon Schlinkert | ||
Copyright (c) 2015 Jon Schlinkert | ||
Released under the , licenses | ||
@@ -111,2 +110,2 @@ | ||
_This file was generated by [verb](https://github.com/assemble/verb) on December 04, 2014._ | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on February 27, 2015._ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4510
2
4
26