├── package.json ├── .gitignore ├── README.md ├── LICENSE └── vue-truncate.js /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-truncate-filter", 3 | "version": "1.1.7", 4 | "description": "A filter for VueJs to truncate string", 5 | "main": "vue-truncate.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/imcvampire/vue-truncate-filter.git" 9 | }, 10 | "keywords": [ 11 | "VueJS", 12 | "truncate", 13 | "filter" 14 | ], 15 | "author": "Nguyen Quoc Anh", 16 | "license": "MIT", 17 | "bugs": { 18 | "url": "https://github.com/imcvampire/vue-truncate-filter/issues" 19 | }, 20 | "homepage": "https://github.com/imcvampire/vue-truncate-filter#readme" 21 | } 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # nyc test coverage 18 | .nyc_output 19 | 20 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 21 | .grunt 22 | 23 | # node-waf configuration 24 | .lock-wscript 25 | 26 | # Compiled binary addons (http://nodejs.org/api/addons.html) 27 | build/Release 28 | 29 | # Dependency directories 30 | node_modules 31 | jspm_packages 32 | 33 | # Optional npm cache directory 34 | .npm 35 | 36 | # Optional REPL history 37 | .node_repl_history 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-truncate-filter 2 | 3 | [![Greenkeeper badge](https://badges.greenkeeper.io/imcvampire/vue-truncate-filter.svg)](https://greenkeeper.io/) 4 | 5 | A filter for Vuejs to truncate string 6 | 7 | ## Install: 8 | 9 | ### CommonJS 10 | 11 | Available through npm as `vue-truncate-filter`: `npm install vue-truncate-filter --save` 12 | 13 | ``` js 14 | var VueTruncate = require('vue-truncate-filter') 15 | Vue.use(VueTruncate) 16 | ``` 17 | 18 | ### Direct include 19 | 20 | - You can also directly include it with a `