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

vue-offline

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-offline - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

2

lib/vue-offline.js

@@ -169,3 +169,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

if ((typeof window === "undefined" ? "undefined" : _typeof(window)) !== undefined) {
localStorage.setItem(key, value);
localStorage.setItem(key, JSON.stringify(value));

@@ -172,0 +172,0 @@ _addKey(key);

@@ -1,2 +0,2 @@

!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("vue-offline",[],n):"object"==typeof exports?exports["vue-offline"]=n():e["vue-offline"]=n()}(window,function(){return function(e){var n={};function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(o,i,function(n){return e[n]}.bind(null,i));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.r(n),t.d(n,"VueOfflineMixin",function(){return i}),t.d(n,"VueOfflineStorage",function(){return r}),t.d(n,"VueOfflinePlugin",function(){return f});var i={data:function(){return{isOnline:!1,isOffline:!1}},mounted:function(){var e=this;if(void 0!==("undefined"==typeof window?"undefined":o(window))){navigator.onLine?this.isOnline=!0:this.isOffline=!0;var n=function(){e.$emit("online"),e.isOnline=!0,e.isOffline=!1},t=function(){e.$emit("offline"),e.isOffline=!0,e.isOnline=!1};window.addEventListener("online",n),window.addEventListener("offline",t),this.$once("hook:beforeDestroy",function(){window.removeEventListener("online",n),window.removeEventListener("offline",t)})}}};var r={keys:void 0!==("undefined"==typeof window?"undefined":o(window))?localStorage.getItem("VueOfflineStorageKeys"):null,set:function(e,n){void 0!==("undefined"==typeof window?"undefined":o(window))&&(localStorage.setItem(e,n),function(e){var n=JSON.parse(localStorage.getItem("VueOfflineStorageKeys"))||[];n.push(e),localStorage.setItem("VueOfflineStorageKeys",JSON.stringify(n))}(e))},get:function(e){void 0!==("undefined"==typeof window?"undefined":o(window))&&JSON.parse(localStorage.getItem(e))}},f={install:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{mixin:!0,storage:!0},t=n.mixin;n.storage&&(e.prototype.$offlineStorage=r),t&&e.mixin(i)}};n.default=f}])});
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("vue-offline",[],n):"object"==typeof exports?exports["vue-offline"]=n():e["vue-offline"]=n()}(window,function(){return function(e){var n={};function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(o,i,function(n){return e[n]}.bind(null,i));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.r(n),t.d(n,"VueOfflineMixin",function(){return i}),t.d(n,"VueOfflineStorage",function(){return r}),t.d(n,"VueOfflinePlugin",function(){return f});var i={data:function(){return{isOnline:!1,isOffline:!1}},mounted:function(){var e=this;if(void 0!==("undefined"==typeof window?"undefined":o(window))){navigator.onLine?this.isOnline=!0:this.isOffline=!0;var n=function(){e.$emit("online"),e.isOnline=!0,e.isOffline=!1},t=function(){e.$emit("offline"),e.isOffline=!0,e.isOnline=!1};window.addEventListener("online",n),window.addEventListener("offline",t),this.$once("hook:beforeDestroy",function(){window.removeEventListener("online",n),window.removeEventListener("offline",t)})}}};var r={keys:void 0!==("undefined"==typeof window?"undefined":o(window))?localStorage.getItem("VueOfflineStorageKeys"):null,set:function(e,n){void 0!==("undefined"==typeof window?"undefined":o(window))&&(localStorage.setItem(e,JSON.stringify(n)),function(e){var n=JSON.parse(localStorage.getItem("VueOfflineStorageKeys"))||[];n.push(e),localStorage.setItem("VueOfflineStorageKeys",JSON.stringify(n))}(e))},get:function(e){void 0!==("undefined"==typeof window?"undefined":o(window))&&JSON.parse(localStorage.getItem(e))}},f={install:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{mixin:!0,storage:!0},t=n.mixin;n.storage&&(e.prototype.$offlineStorage=r),t&&e.mixin(i)}};n.default=f}])});
//# sourceMappingURL=vue-offline.min.js.map
{
"name": "vue-offline",
"version": "2.0.2",
"version": "2.0.3",
"description": "Offline states and storage for Vue.js apps and Progressive Web Apps",

@@ -5,0 +5,0 @@ "main": "lib/vue-offline.js",

@@ -54,3 +54,3 @@ /* ----------------------- Mixin ------------------------ */

if ( typeof window !== undefined ) {
localStorage.setItem(key, value)
localStorage.setItem(key, JSON.stringify(value))
_addKey(key)

@@ -57,0 +57,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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