mirror of
https://github.com/nodejs/node.git
synced 2025-05-18 11:29:35 +00:00

PR-URL: https://github.com/nodejs/node/pull/30533 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
6 lines
153 B
JavaScript
6 lines
153 B
JavaScript
'use strict';
|
|
const stringWidth = require('string-width');
|
|
|
|
module.exports = input => Math.max.apply(null, input.split('\n').map(x => stringWidth(x)));
|
|
|