Socket
Socket
Sign inDemoInstall

vue-truncate-filter

Package Overview
Dependencies
0
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-truncate-filter

A filter for VueJs to truncate string


Version published
Maintainers
2
Install size
4.92 kB
Created

Readme

Source

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

Keywords

FAQs

Last updated on 25 Aug 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc