Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tarkhov/vue-string-directives

Vue string directives.
https://github.com/tarkhov/vue-string-directives

directive es5 javascript js library node nodejs npm nuxt nuxtjs string vue vuejs

Last synced: 4 days ago
JSON representation

Vue string directives.

Awesome Lists containing this project

README

        

# Vue string directives

Vue string directives library can change form input value dynamically. All languages are supported.

### Contents

1. [Compatibility](#compatibility)
1. [Version support](#version-support)
2. [Installation](#installation)
1. [NodeJS](#nodejs)
2. [Manually](#manually)
3. [Usage](#usage)
1. [CLI](#cli)
2. [Nuxt](#nuxt)
3. [Local](#local)
4. [CDN](#cdn)
4. [Directives](#directives)
5. [Author](#author)
6. [License](#license)

## Compatibility

Library | Version
------- | -------
Vue | >= 2 and < 3

We support browsers with ECMAScript 5 features, IE 10 and higher, more details can be founded here https://caniuse.com/es5 and here https://vuejs.org/v2/guide/installation.html#Compatibility-Note.

### Version support

Vue | Repo
------- | -------
2.x | [0.x](https://github.com/tarkhov/vue-string-directives/tree/0.x)

## Installation

### NodeJS

```bash
npm install vue-string-directives
```

### Manually

[Download](https://github.com/tarkhov/vue-string-directives/releases/download/v0.1.0/vue-string-directives.zip) package and unpack it or use following commands:

```bash
wget https://github.com/tarkhov/vue-string-directives/releases/download/v0.1.0/vue-string-directives.zip
unzip vue-string-directives.zip
```

## Usage

### CLI

Add following code to your `main.js` file created by Vue CLI:

```js
import VueStringDirectives from 'vue-string-directives'

Vue.use(VueStringDirectives)
```

Your `main.js` will look like this:

```js
import Vue from 'vue'
import App from './App.vue'
import VueStringDirectives from 'vue-string-directives'

Vue.use(VueStringDirectives)

Vue.config.productionTip = false

new Vue({
render: h => h(App),
}).$mount('#app')
```

Alternatively you can use a specific directive to import it into a specific component:

```js
import { upper, lower } from 'vue-string-directives'
export default {
name: 'MyComponent',
directives: {
upper,
lower
}
}
```

Also you can import all directives to component:

```js
import { StringDirectivesMixin } from 'vue-string-directives'
export default {
name: 'MyComponent',
mixins: [StringDirectivesMixin]
}
```

### Nuxt

If you are using nuxt, you need to create a file **vue-string-directives.js** in the plugins folder of your nuxt project with the following content:

```js
import Vue from 'vue'
import VueStringDirectives from 'vue-string-directives'

Vue.use(VueStringDirectives)
```

Then add the following lines to the nuxt.config.js:

```js
plugins: [
{ src: '~plugins/vue-string-directives' }
]
```

### Local

```html



Vue string directives




```

### CDN

```html



Vue string directives




```

## Directives

Letter case.

```html

```

Word case.

```html

```

Raplacing.

```html

```

## Author

**Alexander Tarkhov**

* [Facebook](https://www.facebook.com/alextarkhov)
* [Twitter](https://twitter.com/alextarkhov)
* [Medium](https://medium.com/@tarkhov)
* [LinkedIn](https://www.linkedin.com/in/tarkhov/)

## License

This project is licensed under the **MIT License** - see the `LICENSE` file for details.