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.1.3 to 0.2.0

22

dist/html-dir-content.js

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

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

@@ -17,9 +17,19 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

return options[OPTS_SYM] === true ? options : (_ref = {}, _defineProperty(_ref, OPTS_SYM, true), _defineProperty(_ref, "recursive", options === true || !!options.recursive), _defineProperty(_ref, "bail", options.bail && options.bail > 0 ? options.bail : BAIL_LEVEL), _ref);
return options[OPTS_SYM] === true ? options : (_ref = {}, _defineProperty(_ref, OPTS_SYM, true), _defineProperty(_ref, "recursive", options === true || !!options.recursive), _defineProperty(_ref, "withFullPath", !!options.withFullPath), _defineProperty(_ref, "bail", options.bail && options.bail > 0 ? options.bail : BAIL_LEVEL), _ref);
};
var getFileFromFileEntry = function getFileFromFileEntry(entry) {
var getFile = function getFile(file, fullPath) {
var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
_ref2$withFullPath = _ref2.withFullPath,
withFullPath = _ref2$withFullPath === undefined ? false : _ref2$withFullPath;
return withFullPath ? new File([file], fullPath, { type: file.type }) : file;
};
var getFileFromFileEntry = function getFileFromFileEntry(entry, options) {
return new Promise(function (resolve, reject) {
if (entry.file) {
entry.file(resolve, reject);
entry.file(function (file) {
return resolve(getFile(file, entry.fullPath, options));
}, reject);
} else {

@@ -54,3 +64,3 @@ resolve(null);

} else {
promise = getFileFromFileEntry(entry).then(function (file) {
promise = getFileFromFileEntry(entry, options).then(function (file) {
return file ? [file] : [];

@@ -145,2 +155,2 @@ });

})));
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHRtbC1kaXItY29udGVudC5qcyIsInNvdXJjZXMiOlsiLi4vbGliL3V0aWxzLmpzIiwiLi4vbGliL2ZpbGVMaXN0LmpzIiwiLi4vbGliL2luZGV4LmpzIl0sInNvdXJjZXNDb250ZW50IjpbImNvbnN0IE9QVFNfU1lNID0gXCJvcHRzX2luaXRcIiwgLy9ub3QgdXNpbmcgU3ltYm9sIHRvIGF2b2lkIHBvbHlmaWxsXG4gICAgQkFJTF9MRVZFTCA9IDEwMDAsXG4gICAgYXJyYXlDb25jYXQgPSBBcnJheS5wcm90b3R5cGUuY29uY2F0O1xuXG5jb25zdCBpbml0T3B0aW9ucyA9IChvcHRpb25zKSA9PiBvcHRpb25zW09QVFNfU1lNXSA9PT0gdHJ1ZSA/XG4gICAgb3B0aW9ucyA6IHtcbiAgICAgICAgW09QVFNfU1lNXTogdHJ1ZSxcbiAgICAgICAgcmVjdXJzaXZlOiBvcHRpb25zID09PSB0cnVlIHx8ICEhb3B0aW9ucy5yZWN1cnNpdmUsXG4gICAgICAgIGJhaWw6IChvcHRpb25zLmJhaWwgJiYgb3B0aW9ucy5iYWlsID4gMCkgPyBvcHRpb25zLmJhaWwgOiBCQUlMX0xFVkVMLFxuICAgIH07XG5cbmNvbnN0IGdldEZpbGVGcm9tRmlsZUVudHJ5ID0gKGVudHJ5KSA9PlxuICAgIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgICAgaWYgKGVudHJ5LmZpbGUpIHtcbiAgICAgICAgICAgIGVudHJ5LmZpbGUocmVzb2x2ZSwgcmVqZWN0KTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHJlc29sdmUobnVsbCk7XG4gICAgICAgIH1cbiAgICB9KVxuICAgICAgICAuY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2UgPSBnZXRGaWxlRnJvbUZpbGVFbnRyeShlbnRyeSlcbiAgICAgICAgICAgIC50aGVuKChmaWxlKSA9PiAoZmlsZSA/IFtmaWxlXSA6IFtdKSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHByb21pc2U7XG59O1xuXG4vKipcbiAqIHJldHVybnMgYSBmbGF0IGxpc3Qgb2YgZmlsZXMgZm9yIHJvb3QgZGlyIGl0ZW1cbiAqIGlmIHJlY3Vyc2l2ZSBpcyB0cnVlIHdpbGwgZ2V0IGFsbCBmaWxlcyBmcm9tIHN1YiBmb2xkZXJzXG4gKi9cbmNvbnN0IGdldEZpbGVMaXN0ID0gKHJvb3QsIG9wdGlvbnMsIGxldmVsID0gMCkgPT5cbiAgICAocm9vdCAmJiBsZXZlbCA8IG9wdGlvbnMuYmFpbCAmJiByb290LmlzRGlyZWN0b3J5ICYmIHJvb3QuY3JlYXRlUmVhZGVyKSA/XG4gICAgICAgIG5ldyBQcm9taXNlKChyZXNvbHZlKSA9PiB7XG4gICAgICAgICAgICByb290LmNyZWF0ZVJlYWRlcigpXG4gICAgICAgICAgICAgICAgLnJlYWRFbnRyaWVzKFxuICAgICAgICAgICAgICAgICAgICAoZW50cmllcykgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgIFByb21pc2UuYWxsKGVudHJpZXMubWFwKChlbnRyeSkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRFbnRyeURhdGEoZW50cnksIG9wdGlvbnMsIGxldmVsKSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLnRoZW4oKHJlc3VsdHMpID0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUoZ2V0TGlzdEFzQXJyYXkocmVzdWx0cykpKSwgLy9mbGF0dGVuIHRoZSByZXN1bHRzXG4gICAgICAgICAgICAgICAgICAgICgpID0+IHJlc29sdmUoW10pKTsgLy9mYWlsIHNpbGVudGx5XG4gICAgICAgIH0pIDpcbiAgIC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LCBvcHRpb25zID0ge30pID0+IHtcbiAgICBvcHRpb25zID0gaW5pdE9wdGlvbnMob3B0aW9ucyk7XG5cbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHtcbiAgICAgICAgaWYgKGV2dC5kYXRhVHJhbnNmZXIuaXRlbXMpIHtcbiAgICAgICAgICAgIFByb21pc2UuYWxsKFxuICAgICAgICAgICAgICAgIGdldExpc3RBc0FycmF5KGV2dC5kYXRhVHJhbnNmZXIuaXRlbXMpXG4gICAgICAgICAgICAgICAgICAgIC5maWx0ZXIoKGl0ZW0pID0+IGlzSXRlbUZpbGVFbnRyeShpdGVtKSlcbiAgICAgICAgICAgICAgICAgICAgLm1hcCgoaXRlbSkgPT4gZ2V0RGF0YVRyYW5zZmVySXRlbUZpbGVzKGl0ZW0sIG9wdGlvbnMpKVxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIC50aGVuKChmaWxlcykgPT4gcmVzb2x2ZShnZXRMaXN0QXNBcnJheShmaWxlcykpKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChldnQuZGF0YVRyYW5zZmVyLmZpbGVzKSB7XG4gICAgICAgICAgICByZXNvbHZlKGdldExpc3RBc0FycmF5KGV2dC5kYXRhVHJhbnNmZXIuZmlsZXMpKTsgLy90dXJuIGludG8gcmVndWxhciBhcnJheSAoaW5zdGVhZCBvZiBGaWxlTGlzdClcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHJlc29sdmUoW10pO1xuICAgICAgICB9XG4gICAgfSk7XG59O1xuXG5leHBvcnQge1xuICAgIGdldEZpbGVzLFxuICAgIGdldEZpbGVzRnJvbURyYWdFdmVudFxufTtcbiJdLCJuYW1lcyI6WyJPUFRTX1NZTSIsIkJBSUxfTEVWRUwiLCJhcnJheUNvbmNhdCIsIkFycmF5IiwicHJvdG90eXBlIiwiY29uY2F0IiwiaW5pdE9wdGlvbnMiLCJvcHRpb25zIiwicmVjd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FBZ0JpQyxLQUF4Qjs7O2VBR0dBLEtBQVA7S0FQUixDQUQ2QjtDQUFqQzs7Ozs7Ozs7Ozs7QUFvQkEsSUFBTUcsd0JBQXdCLFNBQXhCQSxxQkFBd0IsQ0FBQ0MsR0FBRCxFQUF1QjtRQUFqQjFDLE9BQWlCLHVFQUFQLEVBQU87O2NBQ3ZDRCxZQUFZQyxPQUFaLENBQVY7O1dBRU8sSUFBSVcsT0FBSixDQUFZLFVBQUNDLE9BQUQsRUFBYTtZQUN4QjhCLElBQUlDLFlBQUosQ0FBaUJDLEtBQXJCLEVBQTRCO29CQUNoQlgsR0FBUixDQUNJYixlQUFlc0IsSUFBSUMsWUFBSixDQUFpQkMsS0FBaEMsRUFDS0MsTUFETCxDQUNZLFVBQUM3QixJQUFEO3VCQUFVRCxnQkFBZ0JDLElBQWhCLENBQVY7YUFEWixFQUVLa0IsR0FGTCxDQUVTLFVBQUNsQixJQUFEO3VCQUFVcUIseUJBQXlCckIsSUFBekIsRUFBK0JoQixPQUEvQixDQUFWO2FBRlQsQ0FESixFQUtLNEIsSUFMTCxDQUtVLFVBQUNVLEtBQUQ7dUJBQVcxQixRQUFRUSxlQUFla0IsS0FBZixDQUFSLENBQVg7YUFMVjtTQURKLE1BUUssSUFBSUksSUFBSUMsWUFBSixDQUFpQkwsS0FBckIsRUFBNEI7b0JBQ3JCbEIsZUFBZXNCLElBQUlDLFlBQUosQ0FBaUJMLEtBQWhDLENBQVIsRUFENkI7U0FBNUIsTUFHQTtvQkFDTyxFQUFSOztLQWJELENBQVA7Q0FISjs7Ozs7Ozs7Ozs7OzsifQ==

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

/* html-dir-content v0.1.3 (c) 2017, 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,"bail",e.bail&&e.bail>0?e.bail:1e3),t)},i=function(e){return new Promise(function(n,t){e.file?e.file(n,t):n(null)}).catch(function(){return null})},u=function(e){return"file"===e.kind},o=function(e){return e.getAsEntry?e.getAsEntry():e.webkitGetAsEntry?e.webkitGetAsEntry():null},f=function(e){return t.apply([],e)},a=function(e,n,t){return e.isDirectory?n.recursive?c(e,n,t+1):Promise.resolve([]):i(e).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(f(e))})},function(){return r([])})}):Promise.resolve([])},l=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c(o(e),r(n))},s=function(e,n){return l(e,n).then(function(n){if(!n.length){var t=e.getAsFile();n=t?[t]:n}return n})};e.getFiles=l,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(f(e.dataTransfer.items).filter(function(e){return u(e)}).map(function(e){return s(e,n)})).then(function(e){return t(f(e))}):t(e.dataTransfer.files?f(e.dataTransfer.files):[])})},Object.defineProperty(e,"__esModule",{value:!0})});
/* 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})});
//# sourceMappingURL=html-dir-content.min.js.map
{
"name": "html-dir-content",
"version": "0.1.3",
"version": "0.2.0",
"description": "(recursively) iterate directory entries in the browser (html5 File System API)",

@@ -41,2 +41,3 @@ "main": "dist/html-dir-content.js",

"jest": "^21.2.1",
"jest-cli": "^21.2.1",
"rollup": "^0.50.0",

@@ -43,0 +44,0 @@ "rollup-plugin-babel": "^3.0.2",

@@ -36,2 +36,3 @@ # HTML DIR CONTENT

- bail (default: 1000) - how many levels to follow recursively before bailing
- withFullPath (default: false) - file names contain the full file path

@@ -38,0 +39,0 @@

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