Skip to content
This repository was archived by the owner on Jun 21, 2024. It is now read-only.
This repository was archived by the owner on Jun 21, 2024. It is now read-only.

Clip #48

@customcommander

Description

@customcommander

Example:

clip`Once upon a time ${longStory}`
//=> 'Once upon a time there was a'

Make sure that the final string isn't longer than n characters. Which means that other interpolated values or static parts of the string may be discarded.

Options

  • max — Default to 140 characters (i.e. a tweet)
  • truncate — String to use as a replacement of everything that is discarded. The truncated text plus the truncate string won't exceed max length. Default to an empty string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions