An open API service indexing awesome lists of open source software.

https://github.com/tpkn/shrink-string

Cut the string to bla-bla-bla...
https://github.com/tpkn/shrink-string

Last synced: 3 months ago
JSON representation

Cut the string to bla-bla-bla...

Awesome Lists containing this project

README

        

# Shrink String
Cut the string to bla-bla-bla...

## API
```javascript
String.shrink([len, between])
```

### len
**Type**: _Number_
**Default**: `32`
Cut to this length

### between
**Type**: _String_
**Default**: `..`
This line will be added between the two halves of the text (adds to the length of the final result!)

## Usage
```javascript
'https://github.com'.shrink();
// => https://github.com

'https://developer.mozilla.org/en-US/'.shrink(18, ' - ');
// => https:/ - /en-US/
```