Comparing version 1.4.0 to 1.4.1
@@ -1,2 +0,2 @@ | ||
var t=require("mz/fs"),r=require("path"),n={deep:1,_currentDeep:1},e=function(t){return"all"!==t.deep&&+t.deep<t._currentDeep},i=function(t){var r=Object.assign({},t);return r._currentDeep++,r};exports=module.exports=function(u,c){return new Promise(function(o,s){var h;function a(r,n){return new Promise(function(e,u){var c,o,s,a,f,p,v;return c=(f=n).step,o=f.opts,s=f.output,h[r]?e():(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,y.call(this);{var f;if(v.isSymbolicLink)return(m=r,new Promise(function(r,n){var e;return t.realpath(m).then(function(i){try{return t.lstat(e=i).then(function(t){try{return r({t:t,real:e})}catch(t){return n(t)}},n)}catch(t){return n(t)}},n)})).then(function(t){try{var n;return f=(n=t).real,n.t.isDirectory()?(r=f,p=1):p=2,d.call(this)}catch(t){return u(t)}}.bind(this),u);function d(){return y.call(this)}return d.call(this)}function y(){return b.call(this)}}function b(){if(1!==p)return p&&(s.push(r),h[r]=!0),f.call(this);{return"self"===c?t.readdir(r,"utf8").then(function(t){return t}).then(function(t){try{return a=t||[],h[r]=!0,n.call(this)}catch(t){return u(t)}}.bind(this),u):l(r,i(o),s).then(function(t){try{return n.call(this)}catch(t){return u(t)}}.bind(this),u);function n(){return f.call(this)}}function f(){return e(a)}}}catch(t){return u(t)}var m}.bind(this),u))})}function l(t,n,i){return void 0===i&&(i=[]),new Promise(function(u,c){var o;return e(n)?u(Promise.resolve(i)):a(r.resolve(t),{step:"self",opts:n,output:i}).then(function(e){try{{var s;function h(){var e;return o.length?(e=o.shift(),a(r.join(t,e),{opts:n,output:i}).then(function(t){try{return h}catch(t){return c(t)}},c)):[1]}return o=e||[],(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=h}else t=t.call(this)}catch(t){return c(t)}}}.bind(this))(h);function l(){return u(Promise.resolve(i))}}}catch(t){return c(t)}}.bind(this),c)})}return c=function(t){return Object.assign(JSON.parse(JSON.stringify(n)),t)}(c),h={},l(u,c).then(o,s)})}; | ||
var t=require("path"),r=require("mz/fs"),n={deep:1,_currentDeep:1,ignore:[".git","node_modules"]},e=function(t){return"all"!==t.deep&&Number(t.deep)<t._currentDeep},u=function(t){var r=Object.assign({},t);return r._currentDeep++,r};exports=module.exports=function(i,c){return new Promise(function(o,s){var a;function h(t,n){return new Promise(function(e,i){var c,o,s,h,l;if(c=(l=n).step,o=l.opts,s=l.output,!a[t]){var p;p=0;var v=function(){try{if(1!==p)return p&&(s.push(t),a[t]=!0),l.call(this);{return"self"===c?r.readdir(t,"utf8").then(function(t){return t}).then(function(r){try{return h=(h=r||[]).filter(function(t){return!o.ignore.some(function(r){return r===t})}),a[t]=!0,n.call(this)}catch(t){return i(t)}}.bind(this),i):f(t,u(o),s).then(function(t){try{return n.call(this)}catch(t){return i(t)}}.bind(this),i);function n(){return l.call(this)}}function l(){return e(h)}}catch(t){return i(t)}},d=function(t){try{return e(h)}catch(t){return i(t)}};try{var y;return r.lstat(t).then(function(n){try{if((y=n).isFile())return p=2,c.call(this);{if(y.isDirectory())return p=1,i.call(this);{var e;if(y.isSymbolicLink)return(o=t,new Promise(function(t,n){var e;return r.realpath(o).then(function(u){try{return r.lstat(e=u).then(function(r){try{return t({t:r,real:e})}catch(t){return n(t)}},n)}catch(t){return n(t)}},n)})).then(function(r){try{var n;return e=(n=r).real,n.t.isDirectory()?(t=e,p=1):p=2,u.call(this)}catch(t){return d()}}.bind(this),d);function u(){return i.call(this)}return u.call(this)}function i(){return c.call(this)}}function c(){return v()}}catch(t){return d()}var o}.bind(this),d)}catch(t){d()}}return e()})}function f(r,n,u){return void 0===u&&(u=[]),new Promise(function(i,c){var o;return e(n)?i(Promise.resolve(u)):h(t.resolve(r),{step:"self",opts:n,output:u}).then(function(e){try{{var s;function a(){var e;return o.length?(e=o.shift(),h(t.join(r,e),{opts:n,output:u}).then(function(t){try{return a}catch(t){return c(t)}},c)):[1]}return o=e||[],(s=function(t){for(;t;){if(t.then)return void t.then(s,c);try{if(t.pop){if(t.length)return t.pop()?f.call(this):t;t=a}else t=t.call(this)}catch(t){return c(t)}}}.bind(this))(a);function f(){return i(Promise.resolve(u))}}}catch(t){return c(t)}}.bind(this),c)})}return c=function(t){return Object.assign(JSON.parse(JSON.stringify(n)),t)}(c),a={},f(i,c).then(o,s)})}; | ||
//# sourceMappingURL=files-list.js.map |
{ | ||
"name": "files-list", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "get path dir/child all file path", | ||
@@ -18,7 +18,7 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "npm run build && nyc ava -v", | ||
"test": "npm run build && nyc ava", | ||
"build": "microbundle build files-list.js", | ||
"precommit": "lint-staged", | ||
"pub": "npm run test && npm run npmUp && npm run git", | ||
"npmUp": "npm version minor && npm publish", | ||
"npmUp": "npm version patch && npm publish", | ||
"git": "git push && git push --tags" | ||
@@ -25,0 +25,0 @@ }, |
@@ -54,11 +54,19 @@ # files-list [![Build Status](https://travis-ci.org/chinanf-boy/files-list.svg?branch=master)](https://travis-ci.org/chinanf-boy/files-list) | ||
| name: | deep | | ||
| -------- | ----------------- | | ||
| Type: | `number` | `string`{'all'} | | ||
| Default: | `1` | | ||
| Desc: | how deep you want | | ||
| name: | deep | | ||
| -------- | --------------------------- | | ||
| Type: | `number` \| `string`{'all'} | | ||
| Default: | `1` | | ||
| Desc: | how deep you want | | ||
##### ignore | ||
| name: | ignore | | ||
| -------- | -------------------------- | | ||
| Type: | `Array` | | ||
| Default: | `['.git', 'node_modules']` | | ||
| Desc: | ignore Dir name you want | | ||
### ~~filesList.sync(path, [options])~~ | ||
split the code | ||
split the code to [files-list-sync](https://github.com/chinanf-boy/files-list-sync) | ||
@@ -65,0 +73,0 @@ ### cancat |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
6626
10
84