Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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 3.0.0 to 3.1.0

29

index.d.ts

@@ -1,12 +0,21 @@

/**
Get the visual width of the widest line in a string - the number of columns required to display it.
declare const widestLine: {
/**
Get the visual width of the widest line in a string - the number of columns required to display it.
@example
```
import widestLine from 'widest-line';
@example
```
import widestLine = require('widest-line');
widestLine('古\n\u001B[1m@\u001B[22m');
//=> 2
```
*/
export default function widestLine(input: string): number;
widestLine('古\n\u001B[1m@\u001B[22m');
//=> 2
```
*/
(input: string): number;
// TODO: remove this in the next major version, refactor definition to:
// declare function widestLine(input: string): number;
// export = widestLine;
default: typeof widestLine;
};
export = widestLine;

@@ -15,2 +15,3 @@ 'use strict';

module.exports = widestLine;
// TODO: remove this in the next major version
module.exports.default = widestLine;
{
"name": "widest-line",
"version": "3.0.0",
"version": "3.1.0",
"description": "Get the visual width of the widest line in a string - the number of columns required to display it",

@@ -16,3 +16,3 @@ "license": "MIT",

"scripts": {
"test": "xo && ava && tsd-check"
"test": "xo && ava && tsd"
},

@@ -51,6 +51,6 @@ "files": [

"devDependencies": {
"ava": "^1.3.1",
"tsd-check": "^0.5.0",
"ava": "^1.4.1",
"tsd": "^0.7.1",
"xo": "^0.24.0"
}
}
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