common-stuff
    Preparing search index...

    Function truncate

    • Truncates string

      Parameters

      • value: string
      • length: number
      • ending: string = '...'

      Returns string

      truncate('Hello world', 8)
      // Hello...