Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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 1.0.0 to 1.0.1

LICENSE

7

index.js
/*!
* 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._
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