-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
46 lines (42 loc) · 1.12 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import camel from './directives/camel'
import capitalize from './directives/capitalize'
import kebab from './directives/kebab'
import lower from './directives/lower'
import pad from './directives/pad'
import repeat from './directives/repeat'
import replace from './directives/replace'
import snake from './directives/snake'
import truncate from './directives/truncate'
import upper from './directives/upper'
import StringDirectivesMixin from './mixins/StringDirectivesMixin'
const VueStringDirectives = {
install (Vue) {
Vue.directive('camel', camel)
Vue.directive('capitalize', capitalize)
Vue.directive('kebab', kebab)
Vue.directive('lower', lower)
Vue.directive('pad', pad)
Vue.directive('repeat', repeat)
Vue.directive('replace', replace)
Vue.directive('snake', snake)
Vue.directive('truncate', truncate)
Vue.directive('upper', upper)
}
}
export {
camel,
capitalize,
kebab,
lower,
pad,
repeat,
replace,
snake,
truncate,
upper,
StringDirectivesMixin
}
export default VueStringDirectives
if (typeof window !== 'undefined' && window.Vue) {
window.Vue.use(VueStringDirectives)
}