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

wordwrapjs

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wordwrapjs - npm Package Compare versions

Comparing version 5.0.1 to 5.0.2

12

dist/index.js

@@ -315,10 +315,10 @@ (function (global, factory) {

class WordWrap {
constructor (text, options) {
options = options || {};
constructor (text, options = {}) {
if (!t.isDefined(text)) text = '';
this._lines = String(text).split(/\r\n|\n/g);
this.options = options;
this.options.width = options.width === undefined ? 30 : options.width;
this.options.eol = options.eol || '\n';
this.options = Object.assign({
eol: '\n',
width: 30
}, options);
}

@@ -382,3 +382,3 @@

* @param [options.noTrim] {boolean} - By default, each line output is trimmed. If `noTrim` is set, no line-trimming occurs - all whitespace from the input text is left in.
* @param [options.eol] {boolean} - The end of line character to use. Defaults to `\n`.
* @param [options.eol] {string} - The end of line character to use. Defaults to `\n`.
* @return {string}

@@ -385,0 +385,0 @@ */

{
"name": "wordwrapjs",
"author": "Lloyd Brookes <75pound@gmail.com>",
"version": "5.0.1",
"version": "5.0.2",
"description": "Word-wrapping for javascript.",

@@ -21,3 +21,3 @@ "repository": "https://github.com/75lb/wordwrapjs.git",

"scripts": {
"test": "test-runner test.mjs",
"test": "npm run dist && test-runner test.mjs",
"docs": "jsdoc2md -c jsdoc.conf -t README.hbs index.mjs > README.md; echo",

@@ -27,3 +27,4 @@ "dist": "rollup -c"

"devDependencies": {
"jsdoc-to-markdown": "^7.0.0",
"jsdoc-to-markdown": "^7.0.1",
"rollup": "^2.44.0",
"rollup-plugin-node-resolve": "^5.2.0",

@@ -30,0 +31,0 @@ "test-runner": "~0.8.14"

@@ -105,3 +105,3 @@ [![view on npm](https://badgen.net/npm/v/wordwrapjs)](https://www.npmjs.org/package/wordwrapjs)

| [options.noTrim] | <code>boolean</code> | By default, each line output is trimmed. If `noTrim` is set, no line-trimming occurs - all whitespace from the input text is left in. |
| [options.eol] | <code>boolean</code> | The end of line character to use. Defaults to `\n`. |
| [options.eol] | <code>string</code> | The end of line character to use. Defaults to `\n`. |

@@ -108,0 +108,0 @@ <a name="module_wordwrapjs--WordWrap.lines"></a>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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