Comparing version 1.5.2 to 1.5.3
@@ -220,3 +220,3 @@ "use strict"; | ||
var _loop = function (i) { | ||
var _loop = function _loop(i) { | ||
row[i] = row[i] || []; | ||
@@ -244,3 +244,5 @@ columnNames.forEach(function (columnName) { | ||
function mixin() { | ||
if (Object.assign) return Object.assign.apply(Object, arguments); | ||
var _Object; | ||
if (Object.assign) return (_Object = Object).assign.apply(_Object, arguments); | ||
return ObjectAssign.apply(undefined, arguments); | ||
@@ -251,2 +253,3 @@ } | ||
"use strict"; | ||
if (target === undefined || target === null) throw new TypeError("Cannot convert first argument to object"); | ||
@@ -253,0 +256,0 @@ |
{ | ||
"name": "columnify", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"description": "Render data in text columns. Supports in-column text-wrap.", | ||
@@ -12,9 +12,16 @@ "main": "columnify.js", | ||
}, | ||
"babel": { | ||
"presets": [ | ||
"es2015" | ||
] | ||
}, | ||
"author": "Tim Oxley", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"babel": "^5.8.21", | ||
"chalk": "^1.1.0", | ||
"tap-spec": "^4.0.2", | ||
"tape": "^4.0.3" | ||
"babel": "^6.3.26", | ||
"babel-cli": "^6.3.17", | ||
"babel-preset-es2015": "^6.3.13", | ||
"chalk": "^1.1.1", | ||
"tap-spec": "^4.1.1", | ||
"tape": "^4.4.0" | ||
}, | ||
@@ -21,0 +28,0 @@ "repository": { |
11
width.js
var stripAnsi = require('strip-ansi') | ||
var wcwidth = require('wcwidth') | ||
var stepSize = 10000 | ||
module.exports = function(str) { | ||
return wcwidth(stripAnsi(str)) | ||
// step through data in increments as the stripAnsi | ||
// regex is sensitive to large strings. | ||
var width = 0 | ||
for (var i = 0; i < str.length; i += stepSize + 1) { | ||
width += wcwidth(stripAnsi( | ||
str.slice(i, i + stepSize) | ||
)) | ||
} | ||
return width | ||
} |
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
681
37067
6
7