Skip to content

wearethreebears/truncate-string

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Truncate sting helper

The helper comes with 3 methods:

  fromStart(string, charCount, ellips = '...') {
    /**/
  }
  
  fromEnd(string, charCount, ellips = '...') {
    /**/
  }
  
  fromMiddle(string, charCount, ellips = '[...]') {
    /**/
  }

Each function accepts 3 parameteres:

Param Type Description
string String The string you'd like to truncate
charCount Number The number of characters you'd like to remain
ellips String The style of the ellipsis

About

Helper for truncating stings

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published