Skip to content

arielcamus/vue-truncate-filter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-truncate-filter

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:

 {{ 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

About

A filter for Vuejs to truncate string

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • JavaScript 100.0%