Fix test cases

This commit is contained in:
Stefan Feješ
2017-12-17 22:26:07 +01:00
parent e87678f359
commit 82b850fd00
20 changed files with 21 additions and 21 deletions

View File

@ -8,5 +8,5 @@ Return the string truncated to the desired length, with `...` appended to the en
```js
const truncateString = (str, num) =>
str.length > num ? str.slice(0, num > 3 ? num - 3 : num) + '...' : str;
// truncate('boomerang', 7) -> 'boom...'
// truncateString('boomerang', 7) -> 'boom...'
```