widest-line
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -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" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3729
29