Vue 2.x lightweight string manipulation filter

Vue 2.x lightweight string manipulation filter

Vue 2.x lightweight string manipulation filter.

:scissors: Vue String Filter

Vue 2.x lightweight string manipulation filter

License minified version downloads Travis codecov Greenkeeper badge

Demo

https://mazipan.github.io/vue-string-filter/

Available Filter

  • uppercase
  • lowercase
  • capitalize
  • titlecase
  • slug
  • truncate
  • cut
  • remove
  • remove_first
  • replace
  • replace_first
  • append

Download

# NPM
npm install vue-string-filter

# Yarn
yarn add vue-string-filter

Sample Usage

Use Plugins

import VueStringFilter from 'vue-string-filter'
Vue.use(VueStringFilter)

Use in View

<span>{{ stringWillFormatted | uppercase }}</span>
<span>{{ stringWillFormatted | lowercase }}</span>
<span>{{ stringWillFormatted | capitalize }}</span>
<span>{{ stringWillFormatted | titlecase }}</span>
<span>{{ stringWillFormatted | slug }}</span>
<span>{{ stringWillFormatted | truncate(10) }}</span>
<span>{{ stringWillFormatted | cut(10) }}</span>
<span>{{ stringWillFormatted | remove('stringToRemove') }}</span>
<span>{{ stringWillFormatted | remove_first('stringToRemove') }}</span>
<span>{{ stringWillFormatted | replace('stringToReplace') }}</span>
<span>{{ stringWillFormatted | replace_first('stringToReplace') }}</span>
<span>{{ stringWillFormatted | append('stringToAppend') }}</span>

Contributing

If you'd like to contribute, head to the contributing guidelines. Inside you'll find directions for opening issues, coding standards, and notes on development.


Copyright © 2018 Built with ❤️ by Irfan Maulana

Github Repository