2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-20 10:40:34 +03:00

feat: add es build

fix: add global window detection

chore: update deps
This commit is contained in:
pimlie
2019-02-20 17:05:51 +01:00
parent 1e47a37d6e
commit 56f0b61d1b
11 changed files with 165 additions and 91 deletions
+9 -1
View File
@@ -3,6 +3,14 @@ import { isFunction } from '../shared/typeof'
import updateClientMetaInfo from './updateClientMetaInfo'
export default function _refresh(options = {}) {
const escapeSequences = [
[/&/g, '\u0026'],
[/</g, '\u003c'],
[/>/g, '\u003e'],
[/"/g, '\u0022'],
[/'/g, '\u0027']
]
/**
* When called, will update the current meta info with new meta info.
* Useful when updating meta info as the result of an asynchronous
@@ -14,7 +22,7 @@ export default function _refresh(options = {}) {
* @return {Object} - new meta info
*/
return function refresh() {
const metaInfo = getMetaInfo(options, this.$root)
const metaInfo = getMetaInfo(options, this.$root, escapeSequences)
const tags = updateClientMetaInfo(options, metaInfo)
// emit "event" with new info