Comparing version 3.7.0 to 3.7.1
@@ -86,2 +86,4 @@ 'use strict'; | ||
if (subjectWidth > containerWidth) { | ||
// console.log('subjectWidth', subjectWidth, 'containerWidth', containerWidth, 'subject', subject); | ||
throw new Error('Subject parameter value width cannot be greater than the container width.'); | ||
@@ -88,0 +90,0 @@ } |
@@ -37,3 +37,4 @@ 'use strict'; | ||
re = new RegExp('^.{1,' + size + '}(\\s+|$|\\\\|/|,|\\.|;|\-|_)'); | ||
// https://regex101.com/r/gY5kZ1/1 | ||
re = new RegExp('(^.{1,' + size + '}(\\s+|$))|(^.{1,' + (size - 1) + '}(\\\\|/|_|\\.|,|;|\-))'); | ||
@@ -40,0 +41,0 @@ do { |
{ | ||
"name": "table", | ||
"version": "3.7.0", | ||
"version": "3.7.1", | ||
"description": "Formats data into a string table.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -76,2 +76,4 @@ import _ from 'lodash'; | ||
if (subjectWidth > containerWidth) { | ||
// console.log('subjectWidth', subjectWidth, 'containerWidth', containerWidth, 'subject', subject); | ||
throw new Error(`Subject parameter value width cannot be greater than the container width.`); | ||
@@ -78,0 +80,0 @@ } |
@@ -20,3 +20,4 @@ import _ from 'lodash'; | ||
re = new RegExp('^.{1,' + size + '}(\\s+|$|\\\\|/|,|\\.|;|\-|_)'); | ||
// https://regex101.com/r/gY5kZ1/1 | ||
re = new RegExp('(^.{1,' + size + '}(\\s+|$))|(^.{1,' + (size - 1) + '}(\\\\|/|_|\\.|,|;|\-))') | ||
@@ -23,0 +24,0 @@ do { |
@@ -30,2 +30,7 @@ import { | ||
}); | ||
context('a special character after the length of a container', () => { | ||
it('does not include special character', () => { | ||
expect(wrapWord('aa-bbbbb-cccc', 5)).to.deep.equal(['aa-', 'bbbbb', '-cccc']); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
1484207
4144