@vueuse/rxjs
Advanced tools
Comparing version 8.5.0 to 8.6.0
@@ -6,3 +6,30 @@ ;var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) { | ||
if (Vue) { | ||
if (Vue.version.slice(0, 2) === '2.') { | ||
if (Vue.version.slice(0, 4) === '2.7.') { | ||
for (var key in Vue) { | ||
VueDemi[key] = Vue[key] | ||
} | ||
VueDemi.isVue2 = true | ||
VueDemi.isVue3 = false | ||
VueDemi.install = function (){} | ||
VueDemi.Vue = Vue | ||
VueDemi.Vue2 = Vue | ||
VueDemi.version = Vue.version | ||
VueDemi.set = function(target, key, val) { | ||
if (Array.isArray(target)) { | ||
target.length = Math.max(target.length, key) | ||
target.splice(key, 1, val) | ||
return val | ||
} | ||
Vue.set(target, key, val) | ||
return val | ||
} | ||
VueDemi.del = function(target, key) { | ||
if (Array.isArray(target)) { | ||
target.splice(key, 1) | ||
return | ||
} | ||
Vue.delete(target, key) | ||
} | ||
} | ||
else if (Vue.version.slice(0, 2) === '2.') { | ||
if (VueCompositionAPI) { | ||
@@ -9,0 +36,0 @@ for (var key in VueCompositionAPI) { |
@@ -1,1 +0,1 @@ | ||
var VueDemi=function(e,n,c){if(e.install)return e;if(n)if(n.version.slice(0,2)==="2.")if(c){for(var t in c)e[t]=c[t];e.isVue2=!0,e.isVue3=!1,e.install=function(){},e.Vue=n,e.Vue2=n,e.version=n.version}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(n.version.slice(0,2)==="3."){for(var t in n)e[t]=n[t];e.isVue2=!1,e.isVue3=!0,e.install=function(){},e.Vue=n,e.Vue2=void 0,e.version=n.version,e.set=function(i,u,l){return Array.isArray(i)?(i.length=Math.max(i.length,u),i.splice(u,1,l),l):(i[u]=l,l)},e.del=function(i,u){if(Array.isArray(i)){i.splice(u,1);return}delete i[u]}}else console.error("[vue-demi] Vue version "+n.version+" is unsupported.");else console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`.");return e}(this.VueDemi=this.VueDemi||(typeof VueDemi!="undefined"?VueDemi:{}),this.Vue||(typeof Vue!="undefined"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI!="undefined"?VueCompositionAPI:void 0));(function(e,n,c,t,i){"use strict";function u(r,o){return t.isRef(r)?new n.Observable(s=>{const v=t.watch(r,f=>s.next(f),o);return()=>{v()}}):n.from(r)}function l(r,o){return u(r,{immediate:!0}).pipe(c.filter(s=>s instanceof HTMLElement),c.mergeMap(s=>n.fromEvent(s,o)))}function d(r){return{next:o=>{r.value=o}}}function a(r,o){const s=t.ref(o==null?void 0:o.initialValue),v=r.subscribe({next:f=>s.value=f,error:o==null?void 0:o.onError});return i.tryOnScopeDispose(()=>{v.unsubscribe()}),s}function b(r,o){const s=t.ref(r instanceof n.BehaviorSubject?r.value:void 0),v=r.subscribe({next(f){s.value=f},error:o==null?void 0:o.onError});return t.watch(s,f=>{r.next(f)}),i.tryOnScopeDispose(()=>{v.unsubscribe()}),s}function p(r){i.tryOnScopeDispose(()=>{r.unsubscribe()})}e.from=u,e.fromEvent=l,e.toObserver=d,e.useObservable=a,e.useSubject=b,e.useSubscription=p,Object.defineProperty(e,"__esModule",{value:!0})})(this.VueUse=this.VueUse||{},rxjs,rxjs.operator,VueDemi,VueUse); | ||
var VueDemi=function(n,r,l){if(n.install)return n;if(r)if(r.version.slice(0,4)==="2.7."){for(var o in r)n[o]=r[o];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=r,n.Vue2=r,n.version=r.version,n.set=function(e,s,f){return Array.isArray(e)?(e.length=Math.max(e.length,s),e.splice(s,1,f),f):(r.set(e,s,f),f)},n.del=function(e,s){if(Array.isArray(e)){e.splice(s,1);return}r.delete(e,s)}}else if(r.version.slice(0,2)==="2.")if(l){for(var o in l)n[o]=l[o];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=r,n.Vue2=r,n.version=r.version}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(r.version.slice(0,2)==="3."){for(var o in r)n[o]=r[o];n.isVue2=!1,n.isVue3=!0,n.install=function(){},n.Vue=r,n.Vue2=void 0,n.version=r.version,n.set=function(e,s,f){return Array.isArray(e)?(e.length=Math.max(e.length,s),e.splice(s,1,f),f):(e[s]=f,f)},n.del=function(e,s){if(Array.isArray(e)){e.splice(s,1);return}delete e[s]}}else console.error("[vue-demi] Vue version "+r.version+" is unsupported.");else console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`.");return n}(this.VueDemi=this.VueDemi||(typeof VueDemi!="undefined"?VueDemi:{}),this.Vue||(typeof Vue!="undefined"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI!="undefined"?VueCompositionAPI:void 0));(function(n,r,l,o,e){"use strict";function s(i,t){return o.isRef(i)?new r.Observable(u=>{const d=o.watch(i,c=>u.next(c),t);return()=>{d()}}):r.from(i)}function f(i,t){return s(i,{immediate:!0}).pipe(l.filter(u=>u instanceof HTMLElement),l.mergeMap(u=>r.fromEvent(u,t)))}function v(i){return{next:t=>{i.value=t}}}function a(i,t){const u=o.ref(t==null?void 0:t.initialValue),d=i.subscribe({next:c=>u.value=c,error:t==null?void 0:t.onError});return e.tryOnScopeDispose(()=>{d.unsubscribe()}),u}function b(i,t){const u=o.ref(i instanceof r.BehaviorSubject?i.value:void 0),d=i.subscribe({next(c){u.value=c},error:t==null?void 0:t.onError});return o.watch(u,c=>{i.next(c)}),e.tryOnScopeDispose(()=>{d.unsubscribe()}),u}function p(i){e.tryOnScopeDispose(()=>{i.unsubscribe()})}n.from=s,n.fromEvent=f,n.toObserver=v,n.useObservable=a,n.useSubject=b,n.useSubscription=p,Object.defineProperty(n,"__esModule",{value:!0})})(this.VueUse=this.VueUse||{},rxjs,rxjs.operator,VueDemi,VueUse); |
{ | ||
"name": "@vueuse/rxjs", | ||
"version": "8.5.0", | ||
"version": "8.6.0", | ||
"description": "Enables RxJS reactive functions in Vue", | ||
"author": "Anthony Fu <https://github.com/antfu>", | ||
"license": "MIT", | ||
"funding": "https://github.com/sponsors/antfu", | ||
"homepage": "https://github.com/vueuse/vueuse/tree/main/packages/rxjs#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/vueuse/vueuse.git", | ||
"directory": "packages/rxjs" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/vueuse/vueuse/issues" | ||
}, | ||
"keywords": [ | ||
@@ -12,28 +24,16 @@ "vue", | ||
], | ||
"license": "MIT", | ||
"author": "Anthony Fu <https://github.com/antfu>", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/vueuse/vueuse.git", | ||
"directory": "packages/rxjs" | ||
}, | ||
"funding": "https://github.com/sponsors/antfu", | ||
"main": "./index.cjs", | ||
"module": "./index.mjs", | ||
"types": "./index.d.ts", | ||
"unpkg": "./index.iife.min.js", | ||
"jsdelivr": "./index.iife.min.js", | ||
"sideEffects": false, | ||
"exports": { | ||
".": { | ||
"types": "./index.d.ts", | ||
"import": "./index.mjs", | ||
"require": "./index.cjs", | ||
"types": "./index.d.ts" | ||
"require": "./index.cjs" | ||
}, | ||
"./*": "./*" | ||
}, | ||
"sideEffects": false, | ||
"bugs": { | ||
"url": "https://github.com/vueuse/vueuse/issues" | ||
}, | ||
"homepage": "https://github.com/vueuse/vueuse/tree/main/packages/rxjs#readme", | ||
"main": "./index.cjs", | ||
"module": "./index.mjs", | ||
"unpkg": "./index.iife.min.js", | ||
"jsdelivr": "./index.iife.min.js", | ||
"types": "./index.d.ts", | ||
"peerDependencies": { | ||
@@ -43,3 +43,3 @@ "rxjs": ">=6.0.0" | ||
"dependencies": { | ||
"@vueuse/shared": "8.5.0", | ||
"@vueuse/shared": "8.6.0", | ||
"vue-demi": "*" | ||
@@ -46,0 +46,0 @@ }, |
16397
306
+ Added@vueuse/shared@8.6.0(transitive)
- Removed@vueuse/shared@8.5.0(transitive)
Updated@vueuse/shared@8.6.0