https://github.com/500tech/angular-smart-truncate
String truncation, which let's you see the beginning and the ending of a truncated string.
https://github.com/500tech/angular-smart-truncate
Last synced: 7 days ago
JSON representation
String truncation, which let's you see the beginning and the ending of a truncated string.
- Host: GitHub
- URL: https://github.com/500tech/angular-smart-truncate
- Owner: 500tech
- Created: 2015-01-07T12:31:45.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-01-15T15:36:44.000Z (over 11 years ago)
- Last Synced: 2026-03-23T11:21:14.328Z (3 months ago)
- Language: CoffeeScript
- Size: 160 KB
- Stars: 4
- Watchers: 19
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# angular-smart-truncate
String truncation, which lets you see the beginning and the ending of a truncated string.
## Install
Install via bower:
```bash
bower install --save angular-smart-truncate
```
Add to index.html:
```html
```
Inject ``'500tech.smart-truncate'`` into your main module:
```javascript
angular.module('App', [
// ... other dependencies
'500tech.smart-truncate'
])
```
## Usage
```{{ "/Users/John Appleseed/Desktop/file.jpg" | truncate:20 }}```
will be transformed to:
``` /Users/Jo...file.jpg ```
## License
MIT Licensed
Copyright (c) 2014, [500Tech](http://500tech.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sub-license, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.