vue-truncate-filter

A filter for VueJs to truncate string
78,257 56
Install
npm install vue-truncate-filter
Latest Version:1.1.7
License:MIT
Last Updated:Apr 22, 2018
Links: GitHub  ·  npm
Maintainer: imcvampire

vue-truncate-filter

Greenkeeper badge

A filter for Vuejs to truncate string

Install:

CommonJS

Available through npm as vue-truncate-filter: npm install vue-truncate-filter --save

var VueTruncate = require('vue-truncate-filter')
Vue.use(VueTruncate)

Direct include

  • You can also directly include it with a <script> tag when you have Vue already included globally. It will automatically install itself, and will add a global VueTruncate.

Usage:

Vue 1.x

 {{ text | truncate 100 '....' }}

Vue 2.x

 {{ text | truncate(100) }}

Params:

  • length (Number): Text will be truncated if it's length is more than this param.

  • clamp (String) (default: ...): It will be added to end of text if it's truncated.

License

MIT

Related Packages

vue-truncate

A Vue filter that will truncate text to a specified length.

3,552 8
@opengis/filter

A flexible and extensible filter component system for Vue 3. Ideal for building...

10,212 0
vue-timeago

A timeago filter for Vue.

467,807 717
vue-filter

A collection of Vue.js filter.

35,738
vue-filter-pretty-bytes

Vue 2 Filter to prettify bytes

25,953 3

Version History

Version Released License
1.1.7 MIT
1.1.6 MIT
1.1.5 MIT
1.1.4 MIT
1.1.3 MIT