replace jest with ava
This commit is contained in:
parent
27cc8b23fe
commit
0347b72305
11775 changed files with 84546 additions and 1440575 deletions
16
node_modules/widest-line/index.js
generated
vendored
Normal file
16
node_modules/widest-line/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
'use strict';
|
||||
const stringWidth = require('string-width');
|
||||
|
||||
const widestLine = input => {
|
||||
let max = 0;
|
||||
|
||||
for (const line of input.split('\n')) {
|
||||
max = Math.max(max, stringWidth(line));
|
||||
}
|
||||
|
||||
return max;
|
||||
};
|
||||
|
||||
module.exports = widestLine;
|
||||
// TODO: remove this in the next major version
|
||||
module.exports.default = widestLine;
|
||||
Loading…
Add table
Add a link
Reference in a new issue