bypass-vue-devtools
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -1,11 +0,12 @@ | ||
const noop = {} | ||
// const func = () => noop | ||
const noopDeepProxy: any = new Proxy(noop, { | ||
get() { | ||
return noopDeepProxy as any | ||
const VUE_DEVTOOLS_DETECT_OBJ = { | ||
__NUXT__: { | ||
config: {}, | ||
data: {}, | ||
path: '/', | ||
state: {}, | ||
serverRendered: true, | ||
}, | ||
}) | ||
const VUE_DEVTOOLS_DETECT_KEYS = ['__NUXT__', '$nuxt', '__VUE__'] as const | ||
$nuxt: !0, | ||
__VUE__: !0, | ||
} | ||
export const cheatVueDevtools = () => { | ||
@@ -16,7 +17,7 @@ if (typeof window === 'undefined') { | ||
for (const key of VUE_DEVTOOLS_DETECT_KEYS) { | ||
for (const key in VUE_DEVTOOLS_DETECT_OBJ) { | ||
if (!(key in window)) { | ||
window[key as any] = noopDeepProxy | ||
window[key as any] = (VUE_DEVTOOLS_DETECT_OBJ as any)[key] as any | ||
} | ||
} | ||
} |
@@ -1,9 +0,12 @@ | ||
const noop = {}; | ||
// const func = () => noop | ||
const noopDeepProxy = new Proxy(noop, { | ||
get() { | ||
return noopDeepProxy; | ||
const VUE_DEVTOOLS_DETECT_OBJ = { | ||
__NUXT__: { | ||
config: {}, | ||
data: {}, | ||
path: '/', | ||
state: {}, | ||
serverRendered: true, | ||
}, | ||
}); | ||
const VUE_DEVTOOLS_DETECT_KEYS = ['__NUXT__', '$nuxt', '__VUE__']; | ||
$nuxt: !0, | ||
__VUE__: !0, | ||
}; | ||
const cheatVueDevtools = () => { | ||
@@ -13,5 +16,5 @@ if (typeof window === 'undefined') { | ||
} | ||
for (const key of VUE_DEVTOOLS_DETECT_KEYS) { | ||
for (const key in VUE_DEVTOOLS_DETECT_OBJ) { | ||
if (!(key in window)) { | ||
window[key] = noopDeepProxy; | ||
window[key] = VUE_DEVTOOLS_DETECT_OBJ[key]; | ||
} | ||
@@ -18,0 +21,0 @@ } |
@@ -1,2 +0,2 @@ | ||
const e={},n=new Proxy(e,{get(){return n}}),t=["__NUXT__","$nuxt","__VUE__"],_=()=>{if(!(typeof window>"u"))for(const o of t)o in window||(window[o]=n)};export{_ as cheatVueDevtools}; | ||
const n={__NUXT__:{config:{},data:{},path:"/",state:{},serverRendered:!0},$nuxt:!0,__VUE__:!0},t=()=>{if(!(typeof window>"u"))for(const e in n)e in window||(window[e]=n[e])};export{t as cheatVueDevtools}; | ||
//# sourceMappingURL=index.min.js.map |
@@ -1,9 +0,12 @@ | ||
const noop = {}; | ||
// const func = () => noop | ||
const noopDeepProxy = new Proxy(noop, { | ||
get() { | ||
return noopDeepProxy; | ||
const VUE_DEVTOOLS_DETECT_OBJ = { | ||
__NUXT__: { | ||
config: {}, | ||
data: {}, | ||
path: '/', | ||
state: {}, | ||
serverRendered: true, | ||
}, | ||
}); | ||
const VUE_DEVTOOLS_DETECT_KEYS = ['__NUXT__', '$nuxt', '__VUE__']; | ||
$nuxt: !0, | ||
__VUE__: !0, | ||
}; | ||
export const cheatVueDevtools = () => { | ||
@@ -13,5 +16,5 @@ if (typeof window === 'undefined') { | ||
} | ||
for (const key of VUE_DEVTOOLS_DETECT_KEYS) { | ||
for (const key in VUE_DEVTOOLS_DETECT_OBJ) { | ||
if (!(key in window)) { | ||
window[key] = noopDeepProxy; | ||
window[key] = VUE_DEVTOOLS_DETECT_OBJ[key]; | ||
} | ||
@@ -18,0 +21,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.cheatVueDevtools = void 0; | ||
const noop = {}; | ||
// const func = () => noop | ||
const noopDeepProxy = new Proxy(noop, { | ||
get() { | ||
return noopDeepProxy; | ||
const VUE_DEVTOOLS_DETECT_OBJ = { | ||
__NUXT__: { | ||
config: {}, | ||
data: {}, | ||
path: '/', | ||
state: {}, | ||
serverRendered: true, | ||
}, | ||
}); | ||
const VUE_DEVTOOLS_DETECT_KEYS = ['__NUXT__', '$nuxt', '__VUE__']; | ||
$nuxt: !0, | ||
__VUE__: !0, | ||
}; | ||
const cheatVueDevtools = () => { | ||
@@ -16,5 +19,5 @@ if (typeof window === 'undefined') { | ||
} | ||
for (const key of VUE_DEVTOOLS_DETECT_KEYS) { | ||
for (const key in VUE_DEVTOOLS_DETECT_OBJ) { | ||
if (!(key in window)) { | ||
window[key] = noopDeepProxy; | ||
window[key] = VUE_DEVTOOLS_DETECT_OBJ[key]; | ||
} | ||
@@ -21,0 +24,0 @@ } |
{ | ||
"name": "bypass-vue-devtools", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "TODO", | ||
@@ -5,0 +5,0 @@ "author": "Innei", |
@@ -1,11 +0,12 @@ | ||
const noop = {} | ||
// const func = () => noop | ||
const noopDeepProxy: any = new Proxy(noop, { | ||
get() { | ||
return noopDeepProxy as any | ||
const VUE_DEVTOOLS_DETECT_OBJ = { | ||
__NUXT__: { | ||
config: {}, | ||
data: {}, | ||
path: '/', | ||
state: {}, | ||
serverRendered: true, | ||
}, | ||
}) | ||
const VUE_DEVTOOLS_DETECT_KEYS = ['__NUXT__', '$nuxt', '__VUE__'] as const | ||
$nuxt: !0, | ||
__VUE__: !0, | ||
} | ||
export const cheatVueDevtools = () => { | ||
@@ -16,7 +17,7 @@ if (typeof window === 'undefined') { | ||
for (const key of VUE_DEVTOOLS_DETECT_KEYS) { | ||
for (const key in VUE_DEVTOOLS_DETECT_OBJ) { | ||
if (!(key in window)) { | ||
window[key as any] = noopDeepProxy | ||
window[key as any] = (VUE_DEVTOOLS_DETECT_OBJ as any)[key] as any | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
10244
188
0
22