bdougie / bot-test-repo

this is a repo that I shall install bots to
14 stars 4 forks source link

test actions #473

Open bdougie opened 3 years ago

bdougie commented 3 years ago

How to write a loop in JavaScript

bdougie commented 2 years ago

This is a comment with code

function() {};
bdougie commented 2 years ago

This is code

export default function truncate(str, length = 100, ending = '...') {
  if (str.length > length) {
    return str.substring(0, length - ending.length) + ending;
  }
  return str;
}