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

files-list

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

files-list - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

2

dist/files-list.js

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

var t=require("mz/fs"),r=require("path"),n={deep:1,_currentDeep:1},e=function(t){return Object.assign(JSON.parse(JSON.stringify(n)),t)},i=function(t){return"all"!==t.deep&&+t.deep<t._currentDeep};exports=module.exports=function(n,u){return new Promise(function(c,s){return u=e(u),function n(e,u,c){return void 0===c&&(c=[]),new Promise(function(s,o){var h;return i(u)?s(Promise.resolve(c)):(h=[],t.lstat(e).then(function(t){return t.isFile()}).then(function(i){try{if(i){var f=r.resolve(e);return c.push(f),a.call(this)}return t.readdir(e,"utf8").then(function(t){return t}).then(function(t){try{return h=t,a.call(this)}catch(t){return o(t)}}.bind(this),o);function a(){var i;function f(){var i,s;return h.length?(i=h.shift(),s=r.join(e,i),t.lstat(s).then(function(t){return t.isDirectory()}).then(function(t){try{return t?(u._currentDeep++,n(s,u,c).then(function(t){try{return r.call(this)}catch(t){return o(t)}}.bind(this),o)):(c.push(s),r.call(this));function r(){return f}}catch(t){return o(t)}}.bind(this),o)):[1]}return(i=function(t){for(;t;){if(t.then)return void t.then(i,o);try{if(t.pop){if(t.length)return t.pop()?a.call(this):t;t=f}else t=t.call(this)}catch(t){return o(t)}}}.bind(this))(f);function a(){return s(c)}}}catch(t){return o(t)}}.bind(this),o))})}(n,u).then(c,s)})},exports.sync=function(n,u){return function n(e,u,c){if(void 0===c&&(c=[]),!i(u)){var s=[];if(t.lstatSync(e).isFile()){var o=r.resolve(e);c.push(o)}else s=t.readdirSync(e,"utf8");for(;s.length;){var h=s.shift(),f=r.join(e,h);t.lstatSync(f).isDirectory()?(u._currentDeep++,n(f,u,c)):c.push(f)}return c}}(n,u=e(u))};
var t=require("mz/fs"),r=require("path"),n={deep:1,_currentDeep:1},e=function(t){return Object.assign(JSON.parse(JSON.stringify(n)),t)},i=function(t){return"all"!==t.deep&&+t.deep<t._currentDeep},u=function(t){var r=Object.assign({},t);return r._currentDeep++,r};exports=module.exports=function(n,c){return new Promise(function(o,s){var a;function f(r,n){return new Promise(function(e,i){var c,o,s,f,h,p,v;return c=(h=n).step,o=h.opts,s=h.output,f=[],a[r]?e():(a[r]=!0,p=0,t.lstat(r).then(function(n){try{if((v=n).isFile())return p=2,b.call(this);{if(v.isDirectory())return p=1,d.call(this);{var h;if(v.isSymbolicLink)return(m=r,new Promise(function(r,n){var e,i;return t.realpath(m).then(function(u){try{return t.lstat(e=u).then(function(t){try{return i=t,a[e]=!0,r({t:i,real:e})}catch(t){return n(t)}},n)}catch(t){return n(t)}},n)})).then(function(t){try{var n;return h=(n=t).real,n.t.isDirectory()?(r=h,p=1):p=2,y.call(this)}catch(t){return i(t)}}.bind(this),i);function y(){return d.call(this)}return y.call(this)}function d(){return b.call(this)}}function b(){if(1!==p)return p&&s.push(r),a.call(this);{return"self"===c?t.readdir(r,"utf8").then(function(t){return t}).then(function(t){try{return f=t,n.call(this)}catch(t){return i(t)}}.bind(this),i):l(r,u(o),s).then(function(t){try{return n.call(this)}catch(t){return i(t)}}.bind(this),i);function n(){return a.call(this)}}function a(){return e(f)}}}catch(t){return i(t)}var m}.bind(this),i))})}function l(t,n,e){return void 0===e&&(e=[]),new Promise(function(u,c){var o;return i(n)?u(Promise.resolve(e)):f(r.resolve(t),{step:"self",opts:n,output:e}).then(function(i){try{{var s;function a(){var i;return o.length?(i=o.shift(),f(r.join(t,i),{opts:n,output:e}).then(function(t){try{return a}catch(t){return c(t)}},c)):[1]}return o=i||[],(s=function(t){for(;t;){if(t.then)return void t.then(s,c);try{if(t.pop){if(t.length)return t.pop()?l.call(this):t;t=a}else t=t.call(this)}catch(t){return c(t)}}}.bind(this))(a);function l(){return u(e)}}}catch(t){return c(t)}}.bind(this),c)})}return c=e(c),a={},l(n,c).then(o,s)})},exports.sync=function(n,c){var o={};function s(r,n){var e=n.step,i=n.opts,c=n.output,s=[];if(!o[r]){o[r]=!0;var f=0,l=t.lstatSync(r);if(l.isFile())f=2;else if(l.isDirectory())f=1;else if(l.isSymbolicLink){var h=function(r){var n=t.realpathSync(r),e=t.lstatSync(n);return o[n]=!0,{t:e,real:n}}(r),p=h.real;h.t.isDirectory()?(r=p,f=1):f=2}return 1===f?"self"===e?s=t.readdirSync(r,"utf8"):a(r,u(i),c):f&&c.push(r),s}}function a(t,n,e){if(void 0===e&&(e=[]),i(n))return e;for(var u=s(r.resolve(t),{step:"self",opts:n,output:e})||[];u.length;){var c=u.shift();s(r.join(t,c),{opts:n,output:e})}return e}return a(n,c=e(c))};
//# sourceMappingURL=files-list.js.map
{
"name": "files-list",
"version": "1.1.0",
"version": "1.2.0",
"description": "get path dir/child all file path",

@@ -5,0 +5,0 @@ "license": "MIT",

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