From 15f4381cf54901895836551a30f66c0cee974a0c Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 23 Jan 2017 20:42:02 +0000 Subject: Move target URI handling out of zipfile module --- lib/zipfile.js | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'lib/zipfile.js') diff --git a/lib/zipfile.js b/lib/zipfile.js index 9542ae1..7c534c7 100644 --- a/lib/zipfile.js +++ b/lib/zipfile.js @@ -3,7 +3,6 @@ var JSZip = require("jszip"); var promises = require("./promises"); exports.openArrayBuffer = openArrayBuffer; -exports.uriToZipEntryName = uriToZipEntryName; function openArrayBuffer(arrayBuffer) { var zipFile = new JSZip(arrayBuffer); @@ -36,13 +35,3 @@ function openArrayBuffer(arrayBuffer) { toBuffer: toBuffer }; } - -function uriToZipEntryName(base, uri) { - if (uri.charAt(0) === "/") { - return uri.substr(1); - } else { - // In general, we should check first and second for trailing and leading slashes, - // but in our specific case this seems to be sufficient - return base + "/" + uri; - } -} -- cgit v1.2.3