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.1 to 0.1.2

6

dist/html-dir-content.js

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

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

@@ -75,3 +75,3 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

}, //flatten the results
function (err) {
function () {
return resolve([]);

@@ -144,2 +144,2 @@ }); //fail silently

})));
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHRtbC1kaXItY29udGVudC5qcyIsInNvdXJjZXMiOlsiLi4vbGliL3V0aWxzLmpzIiwiLi4vbGliL2ZpbGVMaXN0LmpzIiwiLi4vbGliL2luZGV4LmpzIl0sInNvdXJjZXNDb250ZW50IjpbImNvbnN0IE9QVFNfU1lNID0gXCJvcHRzX2luaXRcIiwgLy9ub3QgdXNpbmcgU3ltYm9sIHRvIGF2b2lkIHBvbHlmaWxsXG4gICAgQkFJTF9MRVZFTCA9IDEwMDAsXG4gICAgYXJyYXlDb25jYXQgPSBBcnJheS5wcm90b3R5cGUuY29uY2F0O1xuXG5jb25zdCBpbml0T3B0aW9ucyA9IChvcHRpb25zKSA9PiBvcHRpb25zW09QVFNfU1lNXSA9PT0gdHJ1ZSA/XG4gICAgb3B0aW9ucyA6IHtcbiAgICAgICAgW09QVFNfU1lNXTogdHJ1ZSxcbiAgICAgICAgcmVjdXJzaXZlOiBvcHRpb25zID09PSB0cnVlIHx8ICEhb3B0aW9ucy5yZWN1cnNpdmUsXG4gICA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kMsSUFBaEIsQ0FBVjthQURaLEVBRUtrQixHQUZMLENBRVMsVUFBQ2xCLElBQUQ7dUJBQVVxQix5QkFBeUJyQixJQUF6QixFQUErQlgsT0FBL0IsQ0FBVjthQUZULENBREosRUFLS3VCLElBTEwsQ0FLVSxVQUFDVSxLQUFEO3VCQUFXM0IsUUFBUVMsZUFBZWtCLEtBQWYsQ0FBUixDQUFYO2FBTFY7U0FESixNQVFLLElBQUlJLElBQUlDLFlBQUosQ0FBaUJMLEtBQXJCLEVBQTRCO29CQUNyQmxCLGVBQWVzQixJQUFJQyxZQUFKLENBQWlCTCxLQUFoQyxDQUFSLEVBRDZCO1NBQTVCLE1BR0E7b0JBQ08sRUFBUjs7S0FiRCxDQUFQO0NBSEo7Ozs7Ozs7Ozs7Ozs7In0=

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

/* html-dir-content v0.1.1 (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(e){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.1.2 (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.1",
"version": "0.1.2",
"description": "(recursively) iterate directory entries in the browser (html5 File System API)",

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

@@ -8,2 +8,17 @@ # HTML DIR CONTENT

### Install
In Node/Webpack environment:
```
npm i html-dir-content
OR
yarn add html-dir-content
```
Directly in the browser:
```
<script src="https://unpkg.com/html-dir-content/dist/html-dir-content.min.js"></script>
```
### API

@@ -34,11 +49,12 @@

> note: The order of files returned is not guaranteed to be in same order the files on the file system or organized
> note: The order of files returned is not guaranteed to be in same order the files on the file system are organized
### Example
check out this [codepen](https://codepen.io/poeticGeek/pen/xXmPyX).
your HTML:
``` html
<script src="dist/html-dir-content.min.js"></script>
<script src="<path-to-node_modules>/html-dir-content/dist/html-dir-content.min.js"></script>
```

@@ -60,2 +76,16 @@

or with import/require:
``` javascript
import {getFilesFromDragEvent} from "html-dir-content";
.
.
.
getFilesFromDragEvent(e, true)
.then((files) => {
});
```
You can drag a directory (ex: from File Explorer / Finder) and the resolved files array will contain the files contained within it and its sub folders

@@ -62,0 +92,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