Comparing version 1.0.0 to 1.0.1
@@ -1,1 +0,4 @@ | ||
var g=Object.defineProperty;var y=n=>g(n,"__esModule",{value:!0});var w=(n,o)=>{y(n);for(var t in o)g(n,t,{get:o[t],enumerable:!0})};w(exports,{defer:()=>b,queuePromises:()=>P,sleep:()=>v});function v(n){return new Promise(o=>{setTimeout(o,n)})}function b(){let n,o;return{promise:new Promise((e,s)=>{n=e,o=s}),resolve(e){n&&n(e)},reject(e){o&&o(e)}}}function P({concurrency:n,onProgress:o}){let t=[],e=0,s=!0,a=Date.now(),i=0,c=0,f=0,m={total(){return e},pending(){return t.length},done(){return e-t.length},percent(){return(e-t.length)/e},rate(){let r=Date.now();return r>c?"-":(e-t.length)/(r-a)},timeRemaining(){let r=Date.now();if(r>c)return"-";let T=(r-a)/1e3,x=(e-t.length)/T,u=(e-t.length)/x;if(u<50)return u.toFixed(0)+" seconds";if(u<120)return"one minute";let l=u/60;if(l<60)return l.toFixed(0)+" minutes";let d=l/60;return d<120?"one hour":d.toFixed(0)+" hours"}};return{state(){return s?"idle":m},enqueue(r){t.push(r),e++,c=Date.now()+1e3,p()}};function p(){s&&(a=Date.now(),s=!1);let r=Date.now();r>f&&(f=r+1e3,setTimeout(()=>{o(m)},1)),t.length?i<n&&setTimeout(h,1):i<1&&(e=0,s=!0)}async function h(){if(t.length<1)return;let r=t.shift();i++;try{await r()}finally{i--,p()}}} | ||
export * from './sleep'; | ||
export * from './defer'; | ||
export * from './queue'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "pjobs", | ||
"description": "Efficient promise queue job manager", | ||
"version": "1.0.0", | ||
"index": "dist/index.js" | ||
"description": "A simple and efficient queue job executor using promises. And some promise's utilities.", | ||
"version": "1.0.1", | ||
"private": false, | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"devDependencies": { | ||
"@types/jest": "^27.0.2", | ||
"@types/source-map-support": "^0.5.4", | ||
"dts-bundle-generator": "^5.9.0", | ||
"esbuild": "^0.13.9", | ||
"esbuild-jest": "^0.5.0", | ||
"jest": "^27.3.1", | ||
"source-map-support": "^0.5.20", | ||
"ts-jest": "^27.0.7", | ||
"typescript": "^4.4.4" | ||
}, | ||
"scripts": { | ||
"buildDTS": "dts-bundle-generator --project ./tsconfig.build.json --verbose", | ||
"buildWithTSC": "tsc -p ./tsconfig.build.json", | ||
"prepublish2": "yarn test && yarn buildWithTSC", | ||
"test": "jest --config ../jest.config.js .", | ||
"clean": "monoclean clean" | ||
} | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
7611
12
1
60
9
174
1