Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clip #48

Open
2 tasks
customcommander opened this issue Sep 2, 2021 · 0 comments
Open
2 tasks

Clip #48

customcommander opened this issue Sep 2, 2021 · 0 comments

Comments

@customcommander
Copy link
Owner

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant