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

html-dir-content

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-dir-content - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

31

dist/html-dir-content.js

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

/* html-dir-content v0.2.0 (c) 2019, Yoav Niran, https://github.com/yoavniran/html-dir-content.git/blob/master/LICENSE */
/* html-dir-content v0.3.0 (c) 2019, Yoav Niran, https://github.com/yoavniran/html-dir-content.git/blob/master/LICENSE */
(function (global, factory) {

@@ -78,12 +78,25 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

return root && level < options.bail && root.isDirectory && root.createReader ? new Promise(function (resolve) {
root.createReader().readEntries(function (entries) {
return Promise.all(entries.map(function (entry) {
var allEntries = [];
var reader = root.createReader();
var createResults = function createResults() {
Promise.all(allEntries.map(function (entry) {
return getEntryData(entry, options, level);
})).then(function (results) {
return resolve(getListAsArray(results));
});
}, //flatten the results
function () {
return resolve([]);
}); //fail silently
}); //flatten the results
};
var readEntries = function readEntries() {
reader.readEntries(function (entries) {
if (entries.length) {
allEntries = allEntries.concat(entries);
readEntries();
} else {
createResults();
}
}, createResults); //fail silently
};
readEntries();
}) : Promise.resolve([]);

@@ -154,2 +167,2 @@ };

})));
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHRtbC1kaXItY29udGVudC5qcyIsInNvdXJjZXMiOlsiLi4vbGliL3V0aWxzLmpzIiwiLi4vbGliL2ZpbGVMaXN0LmpzIiwiLi4vbGliL2luZGV4LmpzIl0sInNvdXJjZXNDb250ZW50IjpbImNvbnN0IE9QVFNfU1lNID0gXCJvcHRzX2luaXRcIiwgLy9ub3QgdXNpbmcgU3ltYm9sIHRvIGF2b2lkIHBvbHlmaWxsXG4gICAgQkFJTF9MRVZFTCA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pbGVFbnRyeShlbnRyeSwgb3B0aW9ucylcbiAgICAgICAgICAgIC50aGVuKChmaWxlKSA9PiAoZmlsZSA/IFtmaWxlXSA6IFtdKSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHByb21pc2U7XG59O1xuXG4vKipcbiAqIHJldHVybnMgYSBmbGF0IGxpc3Qgb2YgZmlsZXMgZm9yIHJvb3QgZGlyIGl0ZW1cbiAqIGlmIHJlY3Vyc2l2ZSBpcyB0cnVlIHdpbGwgZ2V0IGFsbCBmaWxlcyBmcm9tIHN1YiBmb2xkZXJzXG4gKi9cbmNvbnN0IGdldEZpbGVMaXN0ID0gKHJvb3QsIG9wdGlvbnMsIGxldmVsID0gMCkgPT5cbiAgICAocm9vdCAmJiBsZXZlbCA8IG9wdGlvbnMuYmFpbCAmJiByb290LmlzRGlyZWN0b3J5ICYmIHJvb3QuY3JlYXRlUmVhZGVyKSA/XG4gICAgICAgIG5ldyBQcm9taXNlKChyZXNvbHZlKSA9PiB7XG4gICAgICAgICAgICByb290LmNyZWF0ZVJlYWRlcigpXG4gICAgICAgICAgICAgICAgLnJlYWRFbnRyaWVzKFxuICAgICAgICAgICAgICAgICAgICAoZW50cmllcykgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgIFByb21pc2UuYWxsKGVudHJpZXMubWFwKChlbnRyeSkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRFbnRyeURhdGEoZW50cnksIG9wdGlvbnMsIGxldmVsKSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLnRoZW4oKHJlc3VsdHMpID0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUoZ2V0TGlzdEFzQXJyYXkocmVzdWx0cykpKSwgLy9mbGF0dGVuIHRoZSByZXN1bHRzXG4gICAgICAgICAgICAgICAgICAgICgpID0+IHJlc29sdmUoW10pKTsgLy9mYWlsIHNpbGVudGx5XG4gICAgICAgIH0pIDpcbiAgICAgICAgUHJvbW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ID0ge30pID0+IHtcbiAgICBvcHRpb25zID0gaW5pdE9wdGlvbnMob3B0aW9ucyk7XG5cbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHtcbiAgICAgICAgaWYgKGV2dC5kYXRhVHJhbnNmZXIuaXRlbXMpIHtcbiAgICAgICAgICAgIFByb21pc2UuYWxsKFxuICAgICAgICAgICAgICAgIGdldExpc3RBc0FycmF5KGV2dC5kYXRhVHJhbnNmZXIuaXRlbXMpXG4gICAgICAgICAgICAgICAgICAgIC5maWx0ZXIoKGl0ZW0pID0+IGlzSXRlbUZpbGVFbnRyeShpdGVtKSlcbiAgICAgICAgICAgICAgICAgICAgLm1hcCgoaXRlbSkgPT4gZ2V0RGF0YVRyYW5zZmVySXRlbUZpbGVzKGl0ZW0sIG9wdGlvbnMpKVxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIC50aGVuKChmaWxlcykgPT4gcmVzb2x2ZShnZXRMaXN0QXNBcnJheShmaWxlcykpKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChldnQuZGF0YVRyYW5zZmVyLmZpbGVzKSB7XG4gICAgICAgICAgICByZXNvbHZlKGdldExpc3RBc0FycmF5KGV2dC5kYXRhVHJhbnNmZXIuZmlsZXMpKTsgLy90dXJuIGludG8gcmVndWxhciBhcnJheSAoaW5zdGVhZCBvZiBGaWxlTGlzdClcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHJlc29sdmUoW10pO1xuICAgICAgICB9XG4gICAgfSk7XG59O1xuXG5leHBvcnQge1xuICAgIGdldEZpbGVzLFxuICAgIGdldEZpbGVzRnJvbURyYWdFdmVudFxufTtcbiJdLCJuYW1lcyI6WyJPUFRTX1NZTSIsIkJBSUxfTEVWRUwiLCJhcnJheUNvbmNhdCIsIkFycmF5IiwicHJvdG90eXBlIiwiY29uY2F0IiwiaW5pdE9wdGlvbnMiLCJvcHRpb25zIiwicmVjdXJzaXZlIiwid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ZW1cbiAqIGlmIHJlY3Vyc2l2ZSBpcyB0cnVlIHdpbGwgZ2V0IGFsbCBmaWxlcyBmcm9tIHN1YiBmb2xkZXJzXG4gKi9cbmNvbnN0IGdldEZpbGVMaXN0ID0gKHJvb3QsIG9wdGlvbnMsIGxldmVsID0gMCkgPT5cbiAgICAocm9vdCAmJiBsZXZlbCA8IG9wdGlvbnMuYmFpbCAmJiByb290LmlzRGlyZWN0b3J5ICYmIHJvb3QuY3JlYXRlUmVhZGVyKSA/XG4gICAgICAgIG5ldyBQcm9taXNlKChyZXNvbHZlKSA9PiB7XG4gICAgICAgICAgICBsZXQgYWxsRW50cmllcyA9IFtdO1xuICAgICAgICAgICAgY29uc3QgcmVhZGVyID0gcm9vdC5jcmVhdGVSZWFkZXIoKTtcblxuICAgICAgICAgICAgY29uc3QgY3JlYXRlUmVzdWx0cyA9ICgpID0+IHtcbiAgICAgICAgICAgICAgICBQcm9taXNlLmFsbChhbGxFbnRyaWVzLm1hcCgoZW50cnkpID0+XG4gICAgICAgICAgICAgICAgICAgIGdldEVudHJ5RGF0YShlbnRyeSwgb3B0aW9ucywgbGV2ZWwpKSlcbiAgICAgICAgICAgICAgICAgICAgICAgLnRoZW4oKHJlc3VsdHMpID0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKGdldExpc3RBc0FycmF5KHJlc3VsdHMpKSkgLy9mbGF0dGVuIHRoZSByZXN1bHRzXG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBjb25zdCByZWFkRW50cmllcyA9ICgpID0+IHtcbiAgICAgICAgICAgICAgICByZWFkZXIucmVhZEVudHJpZXMoXG4gICAgICAgICAgICAgICAgICAgIChlbnRyaWVzKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZW50cmllcy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGxFbnRyaWVzID0gYWxsRW50cmllcy5jb25jYXQoZW50cmllcyk7XG4gICAgIC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FKLENBQWlCSixLQUFyQixFQUE0QjtvQkFDckJ0QixlQUFleUIsSUFBSUMsWUFBSixDQUFpQkosS0FBaEMsQ0FBUixFQUQ2QjtTQUE1QixNQUdBO29CQUNPLEVBQVI7O0tBYkQsQ0FBUDtDQUhKOzs7Ozs7Ozs7Ozs7OyJ9

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

/* html-dir-content v0.2.0 (c) 2019, Yoav Niran, https://github.com/yoavniran/html-dir-content.git/blob/master/LICENSE */
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.htmlDirContent={})}(this,function(e){"use strict";function n(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var t=Array.prototype.concat,r=function(e){var t;return!0===e.opts_init?e:(t={},n(t,"opts_init",!0),n(t,"recursive",!0===e||!!e.recursive),n(t,"withFullPath",!!e.withFullPath),n(t,"bail",e.bail&&e.bail>0?e.bail:1e3),t)},i=function(e,n){var t=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).withFullPath;return void 0!==t&&t?new File([e],n,{type:e.type}):e},u=function(e,n){return new Promise(function(t,r){e.file?e.file(function(r){return t(i(r,e.fullPath,n))},r):t(null)}).catch(function(){return null})},o=function(e){return"file"===e.kind},f=function(e){return e.getAsEntry?e.getAsEntry():e.webkitGetAsEntry?e.webkitGetAsEntry():null},l=function(e){return t.apply([],e)},a=function(e,n,t){return e.isDirectory?n.recursive?c(e,n,t+1):Promise.resolve([]):u(e,n).then(function(e){return e?[e]:[]})},c=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return e&&t<n.bail&&e.isDirectory&&e.createReader?new Promise(function(r){e.createReader().readEntries(function(e){return Promise.all(e.map(function(e){return a(e,n,t)})).then(function(e){return r(l(e))})},function(){return r([])})}):Promise.resolve([])},s=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c(f(e),r(n))},d=function(e,n){return s(e,n).then(function(n){if(!n.length){var t=e.getAsFile();n=t?[t]:n}return n})};e.getFiles=s,e.getFilesFromDragEvent=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=r(n),new Promise(function(t){e.dataTransfer.items?Promise.all(l(e.dataTransfer.items).filter(function(e){return o(e)}).map(function(e){return d(e,n)})).then(function(e){return t(l(e))}):t(e.dataTransfer.files?l(e.dataTransfer.files):[])})},Object.defineProperty(e,"__esModule",{value:!0})});
/* html-dir-content v0.3.0 (c) 2019, Yoav Niran, https://github.com/yoavniran/html-dir-content.git/blob/master/LICENSE */
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.htmlDirContent={})}(this,function(e){"use strict";function n(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var t=Array.prototype.concat,r=function(e){var t;return!0===e.opts_init?e:(t={},n(t,"opts_init",!0),n(t,"recursive",!0===e||!!e.recursive),n(t,"withFullPath",!!e.withFullPath),n(t,"bail",e.bail&&e.bail>0?e.bail:1e3),t)},i=function(e,n){var t=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).withFullPath;return void 0!==t&&t?new File([e],n,{type:e.type}):e},u=function(e,n){return new Promise(function(t,r){e.file?e.file(function(r){return t(i(r,e.fullPath,n))},r):t(null)}).catch(function(){return null})},o=function(e){return"file"===e.kind},f=function(e){return e.getAsEntry?e.getAsEntry():e.webkitGetAsEntry?e.webkitGetAsEntry():null},a=function(e){return t.apply([],e)},l=function(e,n,t){return e.isDirectory?n.recursive?c(e,n,t+1):Promise.resolve([]):u(e,n).then(function(e){return e?[e]:[]})},c=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return e&&t<n.bail&&e.isDirectory&&e.createReader?new Promise(function(r){var i=[],u=e.createReader(),o=function(){Promise.all(i.map(function(e){return l(e,n,t)})).then(function(e){return r(a(e))})};!function e(){u.readEntries(function(n){n.length?(i=i.concat(n),e()):o()},o)}()}):Promise.resolve([])},s=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c(f(e),r(n))},d=function(e,n){return s(e,n).then(function(n){if(!n.length){var t=e.getAsFile();n=t?[t]:n}return n})};e.getFiles=s,e.getFilesFromDragEvent=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=r(n),new Promise(function(t){e.dataTransfer.items?Promise.all(a(e.dataTransfer.items).filter(function(e){return o(e)}).map(function(e){return d(e,n)})).then(function(e){return t(a(e))}):t(e.dataTransfer.files?a(e.dataTransfer.files):[])})},Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=html-dir-content.min.js.map
{
"name": "html-dir-content",
"version": "0.2.0",
"version": "0.3.0",
"description": "(recursively) iterate directory entries in the browser (html5 File System API)",

@@ -5,0 +5,0 @@ "main": "dist/html-dir-content.js",

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