html-dir-content
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -1,2 +0,2 @@ | ||
/* html-dir-content v0.1.2 (c) 2017, Yoav Niran, https://github.com/yoavniran/html-dir-content.git/blob/master/LICENSE */ | ||
/* html-dir-content v0.1.3 (c) 2017, Yoav Niran, https://github.com/yoavniran/html-dir-content.git/blob/master/LICENSE */ | ||
(function (global, factory) { | ||
@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : |
@@ -1,3 +0,3 @@ | ||
/* html-dir-content v0.1.2 (c) 2017, Yoav Niran, https://github.com/yoavniran/html-dir-content.git/blob/master/LICENSE */ | ||
/* 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})}); | ||
//# sourceMappingURL=html-dir-content.min.js.map |
{ | ||
"name": "html-dir-content", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "(recursively) iterate directory entries in the browser (html5 File System API)", | ||
@@ -11,3 +11,3 @@ "main": "dist/html-dir-content.js", | ||
"build": "NODE_ENV=production node build.js", | ||
"prepublish": "yarn test && yarn build" | ||
"prepublishOnly": "yarn test && yarn build" | ||
}, | ||
@@ -35,2 +35,3 @@ "keywords": [ | ||
"chalk": "^2.1.0", | ||
"coveralls": "^3.0.0", | ||
"eslint": "^4.9.0", | ||
@@ -37,0 +38,0 @@ "eslint-config-airbnb": "^16.0.0", |
@@ -5,2 +5,3 @@ # HTML DIR CONTENT | ||
[![CircleCI](https://circleci.com/gh/yoavniran/html-dir-content.svg?style=svg)](https://circleci.com/gh/yoavniran/html-dir-content) | ||
[![Coverage Status](https://coveralls.io/repos/github/yoavniran/html-dir-content/badge.svg?branch=master)](https://coveralls.io/github/yoavniran/html-dir-content?branch=master) | ||
@@ -37,2 +38,3 @@ **(recursively) iterate directory entries in the browser (html5 File System API)** | ||
* getFilesFromDragEvent(evt: [DragEvent](https://developer.mozilla.org/en-US/docs/Web/Events/drop), options?: Options) | ||
@@ -96,2 +98,2 @@ | ||
> Works on all the latest browser versions (not IE11) | ||
> Works on Chrome, Firefox and Edge (no support on IE11 or Safari) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30786
97
16