vue-cryptojs 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +10 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -12,9 +12,7 @@ And in your entry file:
12
12
  import { createApp } from 'vue'
13
13
  import VueCryptojs from 'vue-cryptojs'
14
14
 
15
- const app = createApp(...)
16
- app.use(VueCryptojs)
17
- app.mount('#app')
15
+ createApp(...).use(VueCryptojs).mount(...)
18
16
 
19
17
  // Vue2
20
18
  import Vue from 'vue'
@@ -31,6 +29,15 @@ const encryptedText = this.$CryptoJS.AES.encrypt("Hi There!", "Secret Passphrase
31
29
  const decryptedText = this.$CryptoJS.AES.decrypt(encryptedText, "Secret Passphrase").toString(this.CryptoJS.enc.Utf8)
32
30
  ```
33
31
 
32
+ Directly on a template:
33
+ ```js
34
+ <template>
35
+ <img alt="Vue logo" src="./assets/logo.png" />
36
+ <HelloWorld msg="Hello Vue 3 + Vite" />
37
+ {{ $CryptoJS.AES.encrypt("Hi There!", "Secret Passphrase").toString() }}
38
+ </template>
39
+ ```
40
+
34
41
  For Vue3 we suggest to use `inject` on Composition API:
35
42
  ```js
36
43
  <script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-cryptojs",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "A small wrapper for integrating crypto-js into VueJS",
5
5
  "main": "dist/vue-cryptojs.min.js",
6
6
  "scripts": {