Skip to content

Instantly share code, notes, and snippets.

View i-havr's full-sized avatar
👋
Hi there!

Ihor Havrylov i-havr

👋
Hi there!
View GitHub Profile
@Serrin
Serrin / endStringWithThreeDots.js
Last active June 10, 2023 18:49 — forked from i-havr/endStringWithThreeDots.js
Функція повертає скорочений до заданої кількості символів рядок із трьома крапками у кінці.
// https://gist.github.com/i-havr/deae1ca8874c01d0ccc1e396714af687
// v0
const LIMIT = 30;
const endStringWithThreeDots = (str) => {
if (str.length <= LIMIT) {
return str;
} else {