Skip to content
✂️ Vue 2.x lightweight string manipulation filter
JavaScript HTML Vue
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist fix webpack setup Oct 3, 2018
test
.babelrc upgrade babel and webpack Oct 3, 2018
.eslintrc.js Add Eslint loader for linter js when developing (#13) Oct 2, 2018
.gitignore
.travis.yml Update dependencies to enable Greenkeeper 🌴 (#18) Mar 21, 2019
App.vue upgrade babel and webpack Oct 3, 2018
CONTRIBUTING.md init commit skeleton plugin Nov 21, 2017
LICENSE Initial commit Nov 21, 2017
README.md Update README.md Oct 1, 2019
VueStringFilter.js Update VueStringFilter.js Oct 2, 2018
index.html change to auto ads May 28, 2018
jest.config.js upgrade babel and webpack Oct 3, 2018
main.js Add Eslint loader for linter js when developing (#13) Oct 2, 2018
package.json
renovate.json added a renovate with automerge (#43) Oct 1, 2019
webpack.config.dev.js fix webpack setup Oct 3, 2018
webpack.config.js
yarn.lock

README.md

✂️ Vue String Filter

Vue 2.x lightweight string manipulation filter

License minified version downloads Travis codecov

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

You can’t perform that action at this time.