New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pizzip

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pizzip - npm Package Compare versions

Comparing version 3.0.6 to 3.1.0

utils/dist/pizzip-utils-ie.js

6

CHANGES.md

@@ -7,2 +7,8 @@ ---

# v3.1.0
Update pako to v2
When using new Pizzip(promise), show specific error message
# v3.0.5

@@ -9,0 +15,0 @@

24

dist/pizzip-utils-ie.js

@@ -89,2 +89,13 @@ /******/ (function(modules) { // webpackBootstrap

/***/ "../node_modules/webpack/buildin/global.js":
/*!*************************************************!*\
!*** ../node_modules/webpack/buildin/global.js ***!
\*************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack:///../node_modules/webpack/buildin/global.js?");
/***/ }),
/***/ "./es6/index_IE.js":

@@ -98,17 +109,6 @@ /*!*************************!*\

"use strict";
eval("/* WEBPACK VAR INJECTION */(function(global) {/* global IEBinaryToArray_ByteStr, IEBinaryToArray_ByteStr_Last */\n // Adapted from http://stackoverflow.com/questions/1095102/how-do-i-load-binary-image-data-using-javascript-and-xmlhttprequest\n\nvar IEBinaryToArray_ByteStr_Script = \"<!-- IEBinaryToArray_ByteStr -->\\r\\n\" + \"<script type='text/vbscript'>\\r\\n\" + \"Function IEBinaryToArray_ByteStr(Binary)\\r\\n\" + \" IEBinaryToArray_ByteStr = CStr(Binary)\\r\\n\" + \"End Function\\r\\n\" + \"Function IEBinaryToArray_ByteStr_Last(Binary)\\r\\n\" + \" Dim lastIndex\\r\\n\" + \" lastIndex = LenB(Binary)\\r\\n\" + \" if lastIndex mod 2 Then\\r\\n\" + \" IEBinaryToArray_ByteStr_Last = Chr( AscB( MidB( Binary, lastIndex, 1 ) ) )\\r\\n\" + \" Else\\r\\n\" + \" IEBinaryToArray_ByteStr_Last = \" + '\"\"' + \"\\r\\n\" + \" End If\\r\\n\" + \"End Function\\r\\n\" + \"</script>\\r\\n\"; // inject VBScript\n\ndocument.write(IEBinaryToArray_ByteStr_Script);\n\nglobal.PizZipUtils._getBinaryFromXHR = function (xhr) {\n var binary = xhr.responseBody;\n var byteMapping = {};\n\n for (var i = 0; i < 256; i++) {\n for (var j = 0; j < 256; j++) {\n byteMapping[String.fromCharCode(i + (j << 8))] = String.fromCharCode(i) + String.fromCharCode(j);\n }\n }\n\n var rawBytes = IEBinaryToArray_ByteStr(binary);\n var lastChr = IEBinaryToArray_ByteStr_Last(binary);\n return rawBytes.replace(/[\\s\\S]/g, function (match) {\n return byteMapping[match];\n }) + lastChr;\n};\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node_modules/webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./es6/index_IE.js?");
eval("/* WEBPACK VAR INJECTION */(function(global) {/* global IEBinaryToArray_ByteStr, IEBinaryToArray_ByteStr_Last */\n // Adapted from http://stackoverflow.com/questions/1095102/how-do-i-load-binary-image-data-using-javascript-and-xmlhttprequest\n\nvar IEBinaryToArray_ByteStr_Script = \"<!-- IEBinaryToArray_ByteStr -->\\r\\n\" + \"<script type='text/vbscript'>\\r\\n\" + \"Function IEBinaryToArray_ByteStr(Binary)\\r\\n\" + \" IEBinaryToArray_ByteStr = CStr(Binary)\\r\\n\" + \"End Function\\r\\n\" + \"Function IEBinaryToArray_ByteStr_Last(Binary)\\r\\n\" + \" Dim lastIndex\\r\\n\" + \" lastIndex = LenB(Binary)\\r\\n\" + \" if lastIndex mod 2 Then\\r\\n\" + \" IEBinaryToArray_ByteStr_Last = Chr( AscB( MidB( Binary, lastIndex, 1 ) ) )\\r\\n\" + \" Else\\r\\n\" + \" IEBinaryToArray_ByteStr_Last = \" + '\"\"' + \"\\r\\n\" + \" End If\\r\\n\" + \"End Function\\r\\n\" + \"</script>\\r\\n\"; // inject VBScript\n\ndocument.write(IEBinaryToArray_ByteStr_Script);\n\nglobal.PizZipUtils._getBinaryFromXHR = function (xhr) {\n var binary = xhr.responseBody;\n var byteMapping = {};\n\n for (var i = 0; i < 256; i++) {\n for (var j = 0; j < 256; j++) {\n byteMapping[String.fromCharCode(i + (j << 8))] = String.fromCharCode(i) + String.fromCharCode(j);\n }\n }\n\n var rawBytes = IEBinaryToArray_ByteStr(binary);\n var lastChr = IEBinaryToArray_ByteStr_Last(binary);\n return rawBytes.replace(/[\\s\\S]/g, function (match) {\n return byteMapping[match];\n }) + lastChr;\n};\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./es6/index_IE.js?");
/***/ }),
/***/ "./node_modules/webpack/buildin/global.js":
/*!***********************************!*\
!*** (webpack)/buildin/global.js ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack:///(webpack)/buildin/global.js?");
/***/ })
/******/ });

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

!function(r){var n={};function t(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return r[e].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=r,t.c=n,t.d=function(r,n,e){t.o(r,n)||Object.defineProperty(r,n,{enumerable:!0,get:e})},t.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},t.t=function(r,n){if(1&n&&(r=t(r)),8&n)return r;if(4&n&&"object"==typeof r&&r&&r.__esModule)return r;var e=Object.create(null);if(t.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:r}),2&n&&"string"!=typeof r)for(var o in r)t.d(e,o,function(n){return r[n]}.bind(null,o));return e},t.n=function(r){var n=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(n,"a",n),n},t.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},t.p="",t(t.s=0)}([function(r,n,t){"use strict";(function(r){document.write("\x3c!-- IEBinaryToArray_ByteStr --\x3e\r\n<script type='text/vbscript'>\r\nFunction IEBinaryToArray_ByteStr(Binary)\r\n IEBinaryToArray_ByteStr = CStr(Binary)\r\nEnd Function\r\nFunction IEBinaryToArray_ByteStr_Last(Binary)\r\n Dim lastIndex\r\n lastIndex = LenB(Binary)\r\n if lastIndex mod 2 Then\r\n IEBinaryToArray_ByteStr_Last = Chr( AscB( MidB( Binary, lastIndex, 1 ) ) )\r\n Else\r\n IEBinaryToArray_ByteStr_Last = \"\"\r\n End If\r\nEnd Function\r\n<\/script>\r\n"),r.PizZipUtils._getBinaryFromXHR=function(r){for(var n=r.responseBody,t={},e=0;e<256;e++)for(var o=0;o<256;o++)t[String.fromCharCode(e+(o<<8))]=String.fromCharCode(e)+String.fromCharCode(o);var i=IEBinaryToArray_ByteStr(n),a=IEBinaryToArray_ByteStr_Last(n);return i.replace(/[\s\S]/g,function(r){return t[r]})+a}}).call(this,t(1))},function(r,n){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(r){"object"==typeof window&&(t=window)}r.exports=t}]);
!function(r){var n={};function t(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return r[e].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=r,t.c=n,t.d=function(r,n,e){t.o(r,n)||Object.defineProperty(r,n,{enumerable:!0,get:e})},t.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},t.t=function(r,n){if(1&n&&(r=t(r)),8&n)return r;if(4&n&&"object"==typeof r&&r&&r.__esModule)return r;var e=Object.create(null);if(t.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:r}),2&n&&"string"!=typeof r)for(var o in r)t.d(e,o,function(n){return r[n]}.bind(null,o));return e},t.n=function(r){var n=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(n,"a",n),n},t.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},t.p="",t(t.s=0)}([function(r,n,t){"use strict";(function(r){document.write("\x3c!-- IEBinaryToArray_ByteStr --\x3e\r\n<script type='text/vbscript'>\r\nFunction IEBinaryToArray_ByteStr(Binary)\r\n IEBinaryToArray_ByteStr = CStr(Binary)\r\nEnd Function\r\nFunction IEBinaryToArray_ByteStr_Last(Binary)\r\n Dim lastIndex\r\n lastIndex = LenB(Binary)\r\n if lastIndex mod 2 Then\r\n IEBinaryToArray_ByteStr_Last = Chr( AscB( MidB( Binary, lastIndex, 1 ) ) )\r\n Else\r\n IEBinaryToArray_ByteStr_Last = \"\"\r\n End If\r\nEnd Function\r\n<\/script>\r\n"),r.PizZipUtils._getBinaryFromXHR=function(r){for(var n=r.responseBody,t={},e=0;e<256;e++)for(var o=0;o<256;o++)t[String.fromCharCode(e+(o<<8))]=String.fromCharCode(e)+String.fromCharCode(o);var i=IEBinaryToArray_ByteStr(n),a=IEBinaryToArray_ByteStr_Last(n);return i.replace(/[\s\S]/g,(function(r){return t[r]}))+a}}).call(this,t(1))},function(r,n){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(r){"object"==typeof window&&(t=window)}r.exports=t}]);

@@ -7,3 +7,3 @@ "use strict";

const pako = require("pako");
const pako = require("pako/dist/pako.es5.js");
exports.uncompressInputType = USE_TYPEDARRAY ? "uint8array" : "array";

@@ -10,0 +10,0 @@ exports.compressInputType = USE_TYPEDARRAY ? "uint8array" : "array";

@@ -263,2 +263,5 @@ "use strict";

exports.getTypeOf = function(input) {
if (input == null) {
return;
}
if (typeof input === "string") {

@@ -279,2 +282,17 @@ return "string";

}
if (input instanceof Promise) {
throw new Error(
"Cannot read data from a promise, you probably are running new PizZip(data) with a promise"
);
}
if (input instanceof Date) {
throw new Error(
"Cannot read data from a Date, you probably are running new PizZip(data) with a date"
);
}
if (typeof input === "object" && input.crc32 == null) {
throw new Error(
"Unsupported data given to new PizZip(data) (object given)"
);
}
};

@@ -281,0 +299,0 @@

@@ -5,3 +5,3 @@ "use strict";

var pako = require("pako");
var pako = require("pako/dist/pako.es5.js");

@@ -8,0 +8,0 @@ exports.uncompressInputType = USE_TYPEDARRAY ? "uint8array" : "array";

"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
var support = require("./support");

@@ -265,2 +267,6 @@

exports.getTypeOf = function (input) {
if (input == null) {
return;
}
if (typeof input === "string") {

@@ -285,2 +291,14 @@ return "string";

}
if (input instanceof Promise) {
throw new Error("Cannot read data from a promise, you probably are running new PizZip(data) with a promise");
}
if (input instanceof Date) {
throw new Error("Cannot read data from a Date, you probably are running new PizZip(data) with a date");
}
if (_typeof(input) === "object" && input.crc32 == null) {
throw new Error("Unsupported data given to new PizZip(data) (object given)");
}
};

@@ -287,0 +305,0 @@ /**

{
"name": "pizzip",
"version": "3.0.6",
"version": "3.1.0",
"author": "Edgar Hipp",

@@ -15,6 +15,6 @@ "description": "Create, read and edit .zip files synchronously with Javascript",

"browserify:lib:min": "cross-env MIN=true webpack",
"preversion": "npm run babel && npm run build && npm test && cp utils/dist/* dist",
"preversion": "npm run babel && npm run build && npm test && npm run utils:build && cp utils/dist/* dist",
"test": "mocha test/test.js",
"test:watch": "mocha test/test.js --watch",
"utils:build": "cd utils && cross-env MIN=true ./node_modules/.bin/webpack && ./node_modules/.bin/webpack && IE=true cross-env MIN=true ./node_modules/.bin/webpack && IE=true ./node_modules/.bin/webpack"
"utils:build": "cd utils && cross-env MIN=true ../node_modules/.bin/webpack && ../node_modules/.bin/webpack && IE=true cross-env MIN=true ../node_modules/.bin/webpack && IE=true ../node_modules/.bin/webpack"
},

@@ -52,23 +52,23 @@ "contributors": [

"devDependencies": {
"@babel/cli": "^7.5.0",
"@babel/core": "^7.5.4",
"@babel/plugin-proposal-object-rest-spread": "^7.5.4",
"@babel/preset-env": "^7.5.4",
"acorn": "^6.2.0",
"babel-eslint": "^10.0.2",
"babel-loader": "^8.0.6",
"chai": "^4.2.0",
"cross-env": "^5.2.0",
"eslint": "^6.0.1",
"eslint-plugin-import": "^2.18.0",
"eslint_d": "^8.0.0",
"mocha": "^6.1.4",
"prettier": "^1.18.2",
"webpack": "^4.36.0",
"webpack-cli": "^3.3.6"
"@babel/cli": "^7.14.8",
"@babel/core": "^7.15.0",
"@babel/plugin-proposal-object-rest-spread": "^7.14.7",
"@babel/preset-env": "^7.15.0",
"acorn": "^8.4.1",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.2.2",
"chai": "^4.3.4",
"cross-env": "^7.0.3",
"eslint": "^7.32.0",
"eslint_d": "^10.1.3",
"eslint-plugin-import": "^2.23.4",
"mocha": "^9.0.3",
"prettier": "^2.3.2",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10"
},
"dependencies": {
"pako": "~1.0.2"
"pako": "^2.0.4"
},
"license": "(MIT OR GPL-3.0)"
}

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

!function(r){var n={};function t(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return r[e].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=r,t.c=n,t.d=function(r,n,e){t.o(r,n)||Object.defineProperty(r,n,{enumerable:!0,get:e})},t.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},t.t=function(r,n){if(1&n&&(r=t(r)),8&n)return r;if(4&n&&"object"==typeof r&&r&&r.__esModule)return r;var e=Object.create(null);if(t.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:r}),2&n&&"string"!=typeof r)for(var o in r)t.d(e,o,function(n){return r[n]}.bind(null,o));return e},t.n=function(r){var n=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(n,"a",n),n},t.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},t.p="",t(t.s=0)}([function(r,n,t){"use strict";(function(r){document.write("\x3c!-- IEBinaryToArray_ByteStr --\x3e\r\n<script type='text/vbscript'>\r\nFunction IEBinaryToArray_ByteStr(Binary)\r\n IEBinaryToArray_ByteStr = CStr(Binary)\r\nEnd Function\r\nFunction IEBinaryToArray_ByteStr_Last(Binary)\r\n Dim lastIndex\r\n lastIndex = LenB(Binary)\r\n if lastIndex mod 2 Then\r\n IEBinaryToArray_ByteStr_Last = Chr( AscB( MidB( Binary, lastIndex, 1 ) ) )\r\n Else\r\n IEBinaryToArray_ByteStr_Last = \"\"\r\n End If\r\nEnd Function\r\n<\/script>\r\n"),r.PizZipUtils._getBinaryFromXHR=function(r){for(var n=r.responseBody,t={},e=0;e<256;e++)for(var o=0;o<256;o++)t[String.fromCharCode(e+(o<<8))]=String.fromCharCode(e)+String.fromCharCode(o);var i=IEBinaryToArray_ByteStr(n),a=IEBinaryToArray_ByteStr_Last(n);return i.replace(/[\s\S]/g,function(r){return t[r]})+a}}).call(this,t(1))},function(r,n){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(r){"object"==typeof window&&(t=window)}r.exports=t}]);
!function(r){var n={};function t(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return r[e].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=r,t.c=n,t.d=function(r,n,e){t.o(r,n)||Object.defineProperty(r,n,{enumerable:!0,get:e})},t.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},t.t=function(r,n){if(1&n&&(r=t(r)),8&n)return r;if(4&n&&"object"==typeof r&&r&&r.__esModule)return r;var e=Object.create(null);if(t.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:r}),2&n&&"string"!=typeof r)for(var o in r)t.d(e,o,function(n){return r[n]}.bind(null,o));return e},t.n=function(r){var n=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(n,"a",n),n},t.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},t.p="",t(t.s=0)}([function(r,n,t){"use strict";(function(r){document.write("\x3c!-- IEBinaryToArray_ByteStr --\x3e\r\n<script type='text/vbscript'>\r\nFunction IEBinaryToArray_ByteStr(Binary)\r\n IEBinaryToArray_ByteStr = CStr(Binary)\r\nEnd Function\r\nFunction IEBinaryToArray_ByteStr_Last(Binary)\r\n Dim lastIndex\r\n lastIndex = LenB(Binary)\r\n if lastIndex mod 2 Then\r\n IEBinaryToArray_ByteStr_Last = Chr( AscB( MidB( Binary, lastIndex, 1 ) ) )\r\n Else\r\n IEBinaryToArray_ByteStr_Last = \"\"\r\n End If\r\nEnd Function\r\n<\/script>\r\n"),r.PizZipUtils._getBinaryFromXHR=function(r){for(var n=r.responseBody,t={},e=0;e<256;e++)for(var o=0;o<256;o++)t[String.fromCharCode(e+(o<<8))]=String.fromCharCode(e)+String.fromCharCode(o);var i=IEBinaryToArray_ByteStr(n),a=IEBinaryToArray_ByteStr_Last(n);return i.replace(/[\s\S]/g,(function(r){return t[r]}))+a}}).call(this,t(1))},function(r,n){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(r){"object"==typeof window&&(t=window)}r.exports=t}]);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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