Home

Awesome

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

Usage:

Vue 1.x

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

Vue 2.x

 {{ text | truncate(100) }}

Params:

License

MIT