10 lines
191 B
JavaScript
10 lines
191 B
JavaScript
|
'use strict';
|
||
|
var stringWidth = require('string-width');
|
||
|
|
||
|
module.exports = function (str) {
|
||
|
return Math.max.apply(null, str.split('\n').map(function (x) {
|
||
|
return stringWidth(x);
|
||
|
}));
|
||
|
};
|
||
|
|