wallet-core/node_modules/widest-line/index.js

10 lines
191 B
JavaScript
Raw Normal View History

2017-05-28 00:38:50 +02:00
'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);
}));
};