{"_id":"@aboutweb/promise-routine","_rev":"2-6d7dc534ec31313d057272dea3d121cb","name":"@aboutweb/promise-routine","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@aboutweb/promise-routine","version":"1.0.0","description":"Creates a trunk out of callbacks that will execute as routine","main":"index.js","directories":{"test":"test"},"scripts":{"test":"jasmine","build":"webpack","watch":"webpack --watch"},"repository":{"type":"git","url":"git+ssh://git@github.com/stephan-dum/promise-routine.git"},"keywords":["promise","es6","routine"],"author":{"name":"Stephan Dum"},"license":"ISC","bugs":{"url":"https://github.com/stephan-dum/promise-routine/issues"},"homepage":"https://github.com/stephan-dum/promise-routine#readme","dependencies":{},"devDependencies":{"jasmine":"^3.1","webpack":"^4.1.1","webpack-cli":"^2.0.12"},"_id":"@aboutweb/promise-routine@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"9.8.0","_npmUser":{"name":"aboutweb","email":"stephan.dum@gmx.at"},"dist":{"integrity":"sha512-rEbWrXFL3LokJLXiFYddLCTNQJezG3wjL4kbNODQUrH6HSd4x1jy3u4q3JpmQrotYJzcgAkA5K/Ua/CzX54FuA==","shasum":"97ee5740a39c1564c381353fd4e308f3744c0be8","tarball":"https://registry.npmjs.org/@aboutweb/promise-routine/-/promise-routine-1.0.0.tgz","fileCount":7,"unpackedSize":10077,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxHxlCRA9TVsSAnZWagAAb58P/RkhRNx47GpuDqiCsR6t\nFd5gEUbzoAG76q2M5z5brdHUpGsx04OLJwNSCKH2tcnDYuCqIWdh49UsKNFn\nWmXwhS8CpOBXtH08Wa6qGb7RcXcjCw9A4fmI51seGrm8XS2cSTPo6w4GIjLr\nLUqLR0pwTtHgduxTEROSTXDps2RP6O1auhiHpbAE1b5DWSY9ckhem6e5uI06\nm0LytdrK5cG2GM0oONf+eZPBROAFFQqAxgpbksGIcUJJd2lGAWyhvRBpZcR1\np7LQQCfecGESB8exsj8KBay89OWo8DoIaE3PG6I2l5u1z7k4ez3MJiFe68be\nXATP9BYkRV+1z6sbsJBcmFDkclI43OSVUu6hcAN9lqpUH4o8NZ5dF3VK1Oh1\nDd8udEXuXmnvrzDp/1v6joUqzE4eRnRzD7OJzkJx4Gz3RARrza+J8Hz01u5h\nUaADIMpht6ZkL/usNmBuG0bVLXk9oh7EYoRsv+by25Ypq6zwtBbiq7UAyRN6\nbESFDNHf2Im4d2orRsoHQLuYSh1rRWNsYUc6wzrzmOvZ0+p/8pxDnKrPnZuR\nfhiOIUL3IinrSUDiZatK3CxqkNKkDUWW0A5G4/DSSmrri+q+yIqs/JEMyVP2\n6nBfbPhtjl5oThbgXqTcFqbFc0+r83bGSLiw9FRidXUocVl+i1ZhEby0S1Tc\nR+Hs\r\n=uYRr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAQxI/4OsNdz1hHc3lmuY5Efk4VBFG7F2edhtRa1FOHdAiEA0LuiKbe2Pbfg6TavnEA3uT2eEcqxitl7CQxQeKaN7gA="}]},"maintainers":[{"name":"aboutweb","email":"stephan.dum@gmx.at"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-routine_1.0.0_1539603556895_0.5107463585073926"},"_hasShrinkwrap":false},"1.0.1":{"name":"@aboutweb/promise-routine","version":"1.0.1","description":"Creates a trunk out of callbacks that will execute as routine","main":"index.js","directories":{"test":"test"},"scripts":{"test":"jasmine","build":"webpack","watch":"webpack --watch"},"repository":{"type":"git","url":"git+ssh://git@github.com/stephan-dum/promise-routine.git"},"keywords":["promise","es6","routine"],"author":{"name":"Stephan Dum"},"license":"ISC","bugs":{"url":"https://github.com/stephan-dum/promise-routine/issues"},"homepage":"https://github.com/stephan-dum/promise-routine#readme","dependencies":{"deep-extend":"^0.6.0"},"devDependencies":{"jasmine":"^3.1","webpack":"^4.26.0","webpack-cli":"^3.1.2"},"gitHead":"9befd387befdb6a0ea0a2d6cf7a41ad456987eab","_id":"@aboutweb/promise-routine@1.0.1","_npmVersion":"6.4.1","_nodeVersion":"9.8.0","_npmUser":{"name":"aboutweb","email":"stephan.dum@gmx.at"},"dist":{"integrity":"sha512-0exneSJXepr9vG3QODiVZavPPq6rAxX+wv+f818sbBqIupFUChXYLP4jtBji+79s7WrslB/IgtIqWNHLRp08uA==","shasum":"50001cd92729f70477050f808f158995fb296695","tarball":"https://registry.npmjs.org/@aboutweb/promise-routine/-/promise-routine-1.0.1.tgz","fileCount":7,"unpackedSize":10111,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9GIjCRA9TVsSAnZWagAA+68P/RiP7Vn20z2pBT3I/vF4\ndeAMiTTj9/+7fcas1FeK8W0V11vcydYFNtIe2u9BwX7xPVC4jIG/NwlKvXg7\nt1DWQi/chCZyVbojAILg/LkmEP9nTQOX1DhKHLR490fyYqabUiGFb+G2lWyg\nBR5T6/oYEg0ZUfGKLfhNB+4Z93Pqyu+kaKaF3rYmC8mNM1KIlubvog7J+moW\npwsjSVz86calSagTIPfhag1k3jogv5jHu+wpphnHBSN3HnDYVlyMma2629gj\nEaXuaSzZSJ0Huz19GJAXP7bErB8mnB+2nSeRWe5ExbEaogz9BXxu3ViyOLDU\n/wuw7nQDgvYAQo9zxlMxQEFrbeCO2it0ATcZWu80WmicR8hWcRnWX4bcHsbk\nicOQiTH2CsbCrOc1KXOtY9+EMB5urxjvlrRJELavECbowDhK6U2+eUUMN0SU\nl4cQwrS0SemCal4mwkhkWBeVsCgHecHpFdVoLe/Dje4DgJBI1p464/j2Fsv5\nIg8S6KpG3/FGdNZN36CMDm61l62fpcuGvzLtKpZ3MQhGpvfRPbU8qmOxLOHT\n2BgUeCZrHbUlZDYk5nFR8ZCpSXDKZJnZNd8UGVfAHAaxLU8hUKcS8R3rstoK\nL2dAVMsQKHQdwoFQjYjplI7mMpg5e8pNbTEdqjTxdZKoiwBQ4ffe9DUt5eqW\nApNy\r\n=J99I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0bli0fEY18PagtTIk1n1CnYr2ppfuk5ITgTZraeL1dQIhANiehl3f+8+IHa2eMDIsCR3R85kZzi37p0D2L/DALyrW"}]},"maintainers":[{"name":"aboutweb","email":"stephan.dum@gmx.at"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-routine_1.0.1_1542742561465_0.3063946027756743"},"_hasShrinkwrap":false}},"time":{"created":"2018-10-15T11:39:16.743Z","1.0.0":"2018-10-15T11:39:17.050Z","modified":"2022-04-04T11:00:43.198Z","1.0.1":"2018-11-20T19:36:01.573Z"},"maintainers":[{"name":"aboutweb","email":"stephan.dum@gmx.at"}],"description":"Creates a trunk out of callbacks that will execute as routine","homepage":"https://github.com/stephan-dum/promise-routine#readme","keywords":["promise","es6","routine"],"repository":{"type":"git","url":"git+ssh://git@github.com/stephan-dum/promise-routine.git"},"author":{"name":"Stephan Dum"},"bugs":{"url":"https://github.com/stephan-dum/promise-routine/issues"},"license":"ISC","readme":"# promise-routine\n\nA promised base routine that builds up trunks which can be executed in a syncrounized fashion.\n\n## Usage:\n\n```javascript\nimport * as routine from \"@aboutweb/promise-routine\";\n\nlet trunk = routine([\n  /*\n    if you don't return a Promise\n    and the function itself is not async\n    next will get called internally with the same args\n  */\n  function(ctx) {\n    ctx.setup = () => {\n      //...\n    }\n  }\n  function(ctx, next) {\n    //init...\n\n    return next(ctx).then(() => {\n      //bubble up\n      ctx.setup();\n    });\n  },\n  async function(ctx, next) {\n    ctx.value = true\n\n    await sleep(100);\n    await next(ctx);\n\n  }\n])\n\nlet ctx = {};\n\ntrunk(ctx).then((ctx) => {\n  //all finised\n});\n\n```\n","readmeFilename":"readme.md"}