Converts tests to TypeScript (#300)

This commit is contained in:
Jaco Greeff
2019-02-14 10:48:08 +01:00
committed by GitHub
parent 2a14a8b553
commit 1e6eb2c283
158 changed files with 89 additions and 183 deletions
+1 -2
View File
@@ -4,7 +4,6 @@
/**
* @name stringShorten
* @signature stringShorten (value: any, prefixLength: number = 8): string
* @summary Returns a string with maximum length
* @description
* Checks the string against the `prefixLength`, if longer than dopuble this, shortens it by placing `..` in the middle of it
@@ -17,7 +16,7 @@
* stringShorten('1234567890', 2); // => 12..90
* ```
*/
export default function stringShorten (_value: any, prefixLength: number = 6): string {
export default function stringShorten (_value?: any, prefixLength: number = 6): string {
const value = `${_value}`;
if (value.length <= 2 + 2 * prefixLength) {