Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-window-size

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-window-size - npm Package Compare versions

Comparing version 1.0.0-3 to 1.0.0-4

42

dist/index.js

@@ -1,1 +0,41 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,i=require("vue-demi"),n=require("window-resize-subject"),t="undefined"!=typeof window,r=function(e){return null!=e?e:t?window.innerWidth:0},u=function(e){return null!=e?e:t?window.innerHeight:0},o=function(e){var n,t=i.reactive({width:r(null==n?void 0:n.width),height:u(null==n?void 0:n.height)});return e().addObserver("composition-api",(function(e){var i=e.width,n=e.height;t.width=i,t.height=n})).subscribe(),function(){return{width:i.computed((function(){return t.width})),height:i.computed((function(){return t.height}))}}}((function(){return e||(e=new n.WindowResizeSubject),e}));exports.useWindowSize=o;
'use strict';
Object.defineProperty(exports, '__esModule', { value: !0 });
var e,
i = require('vue-demi'),
n = require('window-resize-subject'),
t = 'undefined' != typeof window,
r = function (e) {
return null != e ? e : t ? window.innerWidth : 0;
},
u = function (e) {
return null != e ? e : t ? window.innerHeight : 0;
},
o = (function (e) {
var n,
t = i.reactive({
width: r(null == n ? void 0 : n.width),
height: u(null == n ? void 0 : n.height),
});
return (
e()
.addObserver('composition-api', function (e) {
var i = e.width,
n = e.height;
(t.width = i), (t.height = n);
})
.subscribe(),
function () {
return {
width: i.computed(function () {
return t.width;
}),
height: i.computed(function () {
return t.height;
}),
};
}
);
})(function () {
return e || (e = new n.WindowResizeSubject()), e;
});
exports.useWindowSize = o;

@@ -1,1 +0,69 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i,e,n=require("vue-demi"),t=require("window-resize-subject"),u="undefined"!=typeof window,r=function(i){return null!=i?i:u?window.innerWidth:0},o=function(i){return null!=i?i:u?window.innerHeight:0},d=function(i){var e,t=n.reactive({width:r(null==e?void 0:e.width),height:o(null==e?void 0:e.height)});return i.addObserver("option-api",(function(i){var e=i.width,n=i.height;t.width=e,t.height=n})).subscribe(),{computed:{windowWidth:function(){return t.width},windowHeight:function(){return t.height}}}},s=function(){return i||(i=new t.WindowResizeSubject),i},c=function(){return e||(e=d(s())),e},w=function(i){return{setDelay:function(e){i().setDelay(e)},init:function(){i().subscribe()},destroy:function(){i().unsubscribe()}}}(s);var h={install:function(i,e){var n=(void 0===e?{}:e).delay,t=void 0===n?33:n,u=c();s().setDelay(t),i.mixin({mixins:[u]})}};exports.VueWindowSizePlugin=h,exports.vueWindowSizeAPI=w,exports.vueWindowSizeMixin=c;
'use strict';
Object.defineProperty(exports, '__esModule', { value: !0 });
var i,
e,
n = require('vue-demi'),
t = require('window-resize-subject'),
u = 'undefined' != typeof window,
r = function (i) {
return null != i ? i : u ? window.innerWidth : 0;
},
o = function (i) {
return null != i ? i : u ? window.innerHeight : 0;
},
d = function (i) {
var e,
t = n.reactive({
width: r(null == e ? void 0 : e.width),
height: o(null == e ? void 0 : e.height),
});
return (
i
.addObserver('option-api', function (i) {
var e = i.width,
n = i.height;
(t.width = e), (t.height = n);
})
.subscribe(),
{
computed: {
windowWidth: function () {
return t.width;
},
windowHeight: function () {
return t.height;
},
},
}
);
},
s = function () {
return i || (i = new t.WindowResizeSubject()), i;
},
c = function () {
return e || (e = d(s())), e;
},
w = (function (i) {
return {
setDelay: function (e) {
i().setDelay(e);
},
init: function () {
i().subscribe();
},
destroy: function () {
i().unsubscribe();
},
};
})(s);
var h = {
install: function (i, e) {
var n = (void 0 === e ? {} : e).delay,
t = void 0 === n ? 33 : n,
u = c();
s().setDelay(t), i.mixin({ mixins: [u] });
},
};
(exports.VueWindowSizePlugin = h),
(exports.vueWindowSizeAPI = w),
(exports.vueWindowSizeMixin = c);

4

package.json
{
"name": "vue-window-size",
"version": "1.0.0-3",
"version": "1.0.0-4",
"description": "Reactivity window size for Vue.js.",

@@ -25,3 +25,3 @@ "main": "dist/index.js",

"vue-demi": "^0.3.3",
"window-resize-subject": "^1.4.2"
"window-resize-subject": "^1.4.3"
},

@@ -28,0 +28,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc