ritz078 / embed-js

🌻 A lightweight plugin to embed emojis, media, maps, tweets, code and more. ✨
https://codesandbox.io/s/Wp5OlNMn
MIT License
1.27k stars 88 forks source link

test: truncate function #220

Closed ishakalra closed 7 years ago

ishakalra commented 7 years ago

In the truncate function ( embed.js/src/js/modules/utils.js ), if n is same as string.length, an issue arises. truncate('Hello',5) whill return 'Hell', but shouldn't it return 'Hell...'? I think there should be an equality sign here.