gift-card-server/node_modules/widest-line/index.js
Rodrigo Pedroso 3ac017a5ad Commit project
2019-06-19 10:46:14 -04:00

9 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);
}));
};