Sha256: aa42111b6dcd8d3e591719577c3903a7c5b98db9f7e62e39e4401bf124132ba7
Contents?: true
Size: 328 Bytes
Versions: 23
Compression:
Stored size: 328 Bytes
Contents
import stringWidth from 'string-width'; /** * Calculates width of each cell contents. * * @param {string[]} cells * @returns {number[]} */ export default (cells) => { return cells.map((value) => { return Math.max( ...value.split('\n').map((line) => { return stringWidth(line); }) ); }); };
Version data entries
23 entries across 23 versions & 1 rubygems