Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.js « widest-line « node_modules - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 173cec4f296bb8934e45d55ab7710191a96f72d6 (plain)
1
2
3
4
5
'use strict';
const stringWidth = require('string-width');

module.exports = input => Math.max.apply(null, input.split('\n').map(x => stringWidth(x)));