Demo entry 6359827

ss

   

Submitted by anonymous on Apr 30, 2017 at 05:32
Language: JavaScript. Code size: 117 Bytes.

export function sliceWord (str, num) {
  if (str) {
    str = str.slice(0, num) + '...'
  }
  return str || ''
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).