{"_id":"@allegiant/shutdown","_rev":"2-78f2a4f1ca2c09e6335f2ea9e8cad405","name":"@allegiant/shutdown","description":"Simple graceful shutdown helper library.","dist-tags":{"latest":"0.2.3"},"versions":{"0.2.1":{"name":"@allegiant/shutdown","version":"0.2.1","description":"Simple graceful shutdown helper library.","author":{"name":"echopoint","email":"echopoint@tutanota.com"},"contributors":[],"license":"MIT","bugs":{"url":"https://github.com/allegiant-js/shutdown/issues"},"homepage":"https://github.com/allegiant-js/shutdown#readme","repository":{"type":"git","url":"git+https://github.com/allegiant-js/shutdown.git"},"main":"index.js","engine":{"node":">= 6"},"scripts":{"lint":"eslint index.js","test":"tape test/*.js","coverage":"tape test/*.js --coverage --coverage-report=lcov"},"devDependencies":{"eslint":"^4.12.1","jsdoc":"^3.5.5","tape":"^4.8.0"},"gitHead":"17270a9b645f1046ff3e30b13853b64fa06fff79","_id":"@allegiant/shutdown@0.2.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"echopoint","email":"echopoint@tutanota.com"},"dist":{"integrity":"sha512-Swk24CvolDaWQPgJ9NB+beRF2xtKbJcSWG6jyDcgi8T8ubzP+P0N2B1c67mCJwpzESivouAml3xs1YkqWai1Hw==","shasum":"99aeed471243f0e9d4fae31f3f875d88a3bb3288","tarball":"https://registry.npmjs.org/@allegiant/shutdown/-/shutdown-0.2.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAYcBBf29V2C+aQK6L7QJax9kELHFbvMSLu8K3ENcbbJAiAw4tIqTCaHX8KwvcTOj2PVf0+jsnxpAygEtkdxEUfp/w=="}]},"maintainers":[{"name":"echopoint","email":"echopoint@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shutdown-0.2.1.tgz_1514392723589_0.18700375710614026"}},"0.2.3":{"name":"@allegiant/shutdown","version":"0.2.3","description":"Simple graceful shutdown helper library.","author":{"name":"echopoint","email":"echopoint@tutanota.com"},"contributors":[],"license":"MIT","bugs":{"url":"https://github.com/allegiant-js/shutdown/issues"},"homepage":"https://github.com/allegiant-js/shutdown#readme","repository":{"type":"git","url":"git+https://github.com/allegiant-js/shutdown.git"},"main":"index.js","engine":{"node":">= 6"},"scripts":{"lint":"eslint .","test":"tap test/*.js","coverage":"tap test/*.js --coverage"},"dependencies":{},"devDependencies":{"eslint":"^4.12.1","jsdoc":"^3.5.5","tap":"^11.0.1"},"gitHead":"b879ee5907d6d63dded0f3ff4dfb5e4eaa445c68","_id":"@allegiant/shutdown@0.2.3","_npmVersion":"5.6.0","_nodeVersion":"8.9.3","_npmUser":{"name":"echopoint","email":"echopoint@tutanota.com"},"dist":{"integrity":"sha512-2canyk4X2lJIf0YoXoyKc69uu9jgqOtlGepK4qFEV8niyit4npdc/R33Yp79otUBijZsTlkFsplTSJaT15rNiA==","shasum":"0545ec7f7d9f48eeb63d51467fb3500fe1341b32","tarball":"https://registry.npmjs.org/@allegiant/shutdown/-/shutdown-0.2.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICVWEH5OVruCUs4txcGcC/hbsZigeCf0vRtVlTGu3pSeAiEAzdIQhtx0Z8MfZHaXM+xgyKYCAPZzMZ/LMtqPXCKfgww="}]},"maintainers":[{"name":"gabrielcsapo","email":"gabecsapo@gmail.com"},{"name":"echopoint","email":"echopoint@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shutdown-0.2.3.tgz_1515634796726_0.6911540091969073"}}},"readme":"# shutdown\r\n\r\n> Simple graceful shutdown helper library.\r\n>> There be 🐲 here! The API and functionality are being cemented, anything before a 1.0.0 release is subject to change.\r\n\r\n[![Npm Version](https://img.shields.io/npm/v/@allegiant/shutdown.svg)](https://www.npmjs.com/package/@allegiant/shutdown)\r\n[![Build Status](https://travis-ci.org/allegiant-js/shutdown.svg?branch=master)](https://travis-ci.org/allegiant-js/shutdown.svg?branch=master)\r\n[![Coverage Status](https://coveralls.io/repos/github/allegiant-js/shutdown/badge.svg?branch=master)](https://coveralls.io/github/allegiant-js/shutdown?branch=master)\r\n\r\n## Installation\r\n\r\n```\r\nnpm install @allegiant/shutdown --save\r\n```\r\n\r\n## Usage\r\n\r\n```js\r\nconst Shutdown = require('@allegiant/shutdown');\r\n\r\nvar live=false;\r\n\r\nShutdown(onShutdown);\r\nfunction onShutdown(req=false, finished) {\r\n    console.log(\"Shut down triggered... \", req); // eslint-disable-line\r\n    if (live !== false) {\r\n        clearInterval(live);\r\n        finished();\r\n    }\r\n}\r\n\r\nlive = setInterval(function () { \r\n    console.log(\"tick\"); // eslint-disable-line\r\n}, 1000); \r\n\r\nprocess.on('finished', function() {\r\n    console.log(\"finish triggered\"); // eslint-disable-line\r\n});\r\n```\r\n\r\n### Copyright & License\r\n\r\nCopyright &copy; 2017 Allegiant. Distributed under the terms of the MIT License, see [LICENSE](https://github.com/allegiant-js/shutdown/blob/master/LICENSE)\r\n\r\nAvailble via [npm](https://www.npmjs.com/package/@allegiant/shutdown) or [github](https://github.com/allegiant-js/shutdown).\r\n","maintainers":[{"name":"gabrielcsapo","email":"gabecsapo@gmail.com"},{"name":"echopoint","email":"echopoint@tutanota.com"}],"time":{"modified":"2022-04-04T13:31:43.582Z","created":"2017-12-27T16:38:44.419Z","0.2.1":"2017-12-27T16:38:44.419Z","0.2.3":"2018-01-11T01:39:57.775Z"},"homepage":"https://github.com/allegiant-js/shutdown#readme","repository":{"type":"git","url":"git+https://github.com/allegiant-js/shutdown.git"},"contributors":[],"author":{"name":"echopoint","email":"echopoint@tutanota.com"},"bugs":{"url":"https://github.com/allegiant-js/shutdown/issues"},"license":"MIT","readmeFilename":"README.md"}