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

Feature: toEllipsis / truncate / fit #77

Open
vorillaz opened this issue Oct 26, 2019 · 7 comments
Open

Feature: toEllipsis / truncate / fit #77

vorillaz opened this issue Oct 26, 2019 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@vorillaz
Copy link
Contributor

Truncates the input text to the desired length.

Example usage

import toEllipsis from '@plexis/to-ellipsis';

toEllipsis('foo');
// => 'foo'

toEllipsis('foo', 1);
// => '...'

toEllipsis('foo', 3);
// => 'foo'

toEllipsis('As Gregor Samsa awoke one morning from uneasy dreams he found himself transformed in his bed into a monstrous vermin.', 20);
// => 'As Gregor Samsa a...'

toEllipsis('In a hole in the ground there lived a hobbit.', Infinity)
// => 'In a hole in the ground there lived a hobbit.'

toEllipsis('Last night I dreamt I went to Manderley again.', 5);
// => Last...

Aliases

import toEllipsis from '@plexis/to-ellipsis';
import {toEllipsis, truncate, fit} from 'plexis';
@vorillaz vorillaz added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Oct 26, 2019
@protob
Copy link
Contributor

protob commented Oct 27, 2019

Hi, I would like to take this issue. P.S. currently, one of the test suites fails in the master branch.

@vorillaz
Copy link
Contributor Author

@protob I think you are good to go!
The master branch is also 🍏
https://circleci.com/gh/plexis-js/plexis/tree/master

@protob
Copy link
Contributor

protob commented Oct 28, 2019

Thanks. I created a pull request. The previous test error was fixed by running lerna bootstrap.

@protob
Copy link
Contributor

protob commented Nov 5, 2019

I created new pull request.

@protob
Copy link
Contributor

protob commented Mar 2, 2020

@vorillaz Could you merge my pull requests please? Stale bot keeps tagging them as wontfix.

@vorillaz
Copy link
Contributor Author

vorillaz commented Mar 3, 2020

Done @protob , apologies for the late response.

@protob
Copy link
Contributor

protob commented Mar 3, 2020

Thanks @vorillaz ! Could you also merge this one? #112 . The same situation with stale bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants