Socket
Socket
Sign inDemoInstall

unload

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unload - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

8

dist/browserify.js

@@ -14,4 +14,10 @@ (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){

/**
* if we are on react-native, there is no window.addEventListener
* @link https://github.com/pubkey/unload/issues/6
*/
if (typeof window.addEventListener !== 'function') return;
/**
* for normal browser-windows, we use the beforeunload-event
*/
window.addEventListener('beforeunload', function () {

@@ -121,3 +127,3 @@ fn();

return obj && obj.__esModule ? obj : {
default: obj
"default": obj
};

@@ -124,0 +130,0 @@ }

@@ -6,4 +6,10 @@ /* global WorkerGlobalScope */

/**
* if we are on react-native, there is no window.addEventListener
* @link https://github.com/pubkey/unload/issues/6
*/
if (typeof window.addEventListener !== 'function') return;
/**
* for normal browser-windows, we use the beforeunload-event
*/
window.addEventListener('beforeunload', function () {

@@ -10,0 +16,0 @@ fn();

@@ -13,4 +13,10 @@ "use strict";

/**
* if we are on react-native, there is no window.addEventListener
* @link https://github.com/pubkey/unload/issues/6
*/
if (typeof window.addEventListener !== 'function') return;
/**
* for normal browser-windows, we use the beforeunload-event
*/
window.addEventListener('beforeunload', function () {

@@ -17,0 +23,0 @@ fn();

42

package.json
{
"name": "unload",
"version": "2.1.0",
"version": "2.1.1",
"description": "Execute code when the js-process exits. On all javascript-environments",

@@ -43,22 +43,22 @@ "author": "pubkey",

"devDependencies": {
"@babel/cli": "7.1.5",
"@babel/core": "7.1.5",
"@babel/cli": "7.5.5",
"@babel/core": "7.5.5",
"@babel/plugin-check-constants": "7.0.0-beta.38",
"@babel/plugin-proposal-object-rest-spread": "7.0.0",
"@babel/plugin-transform-member-expression-literals": "7.0.0",
"@babel/plugin-transform-property-literals": "7.0.0",
"@babel/plugin-transform-runtime": "7.1.0",
"@babel/polyfill": "7.0.0",
"@babel/preset-env": "7.1.5",
"@babel/types": "7.1.5",
"@babel/plugin-proposal-object-rest-spread": "7.5.5",
"@babel/plugin-transform-member-expression-literals": "7.2.0",
"@babel/plugin-transform-property-literals": "7.2.0",
"@babel/plugin-transform-runtime": "7.5.5",
"@babel/polyfill": "7.4.4",
"@babel/preset-env": "7.5.5",
"@babel/types": "7.5.5",
"assert": "1.4.1",
"async-test-util": "1.6.1",
"browserify": "16.2.3",
"async-test-util": "1.7.3",
"browserify": "16.3.0",
"child-process-promise": "2.2.1",
"child_process": "1.0.2",
"concurrently": "4.0.1",
"concurrently": "4.1.1",
"cors": "2.8.5",
"cross-env": "5.2.0",
"eslint": "5.8.0",
"express": "4.16.4",
"express": "4.17.1",
"http-server": "0.11.1",

@@ -72,16 +72,16 @@ "karma": "3.1.1",

"node-cmd": "3.0.0",
"npm-run-all": "4.1.3",
"npm-run-all": "4.1.5",
"pre-commit": "1.2.2",
"request": "2.88.0",
"request-promise-native": "1.0.5",
"rimraf": "2.6.2",
"request-promise-native": "1.0.7",
"rimraf": "2.6.3",
"ts-node": "7.0.1",
"typescript": "3.1.6",
"uglify-js": "3.4.9",
"typescript": "3.5.3",
"uglify-js": "3.6.0",
"util": "0.11.1",
"watch": "1.0.2",
"watchify": "3.11.0"
"watchify": "3.11.1"
},
"dependencies": {
"@babel/runtime": "7.1.5",
"@babel/runtime": "7.5.5",
"detect-node": "2.0.4"

@@ -88,0 +88,0 @@ },

@@ -7,3 +7,10 @@ /* global WorkerGlobalScope */

} else {
/**
* if we are on react-native, there is no window.addEventListener
* @link https://github.com/pubkey/unload/issues/6
*/
if (typeof window.addEventListener !== 'function') return;
/**
* for normal browser-windows, we use the beforeunload-event

@@ -10,0 +17,0 @@ */

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