Socket
Socket
Sign inDemoInstall

widest-line

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

widest-line - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

7

index.js
'use strict';
const stringWidth = require('string-width');
module.exports = input => Math.max.apply(null, input.split('\n').map(x => stringWidth(x)));
module.exports = input => {
let max = 0;
for (const s of input.split('\n')) max = Math.max(max, stringWidth(s));
return max;
};
{
"name": "widest-line",
"version": "2.0.0",
"version": "2.0.1",
"description": "Get the visual width of the widest line in a string - the number of columns required to display it",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc