This commit is contained in:
oitsjustjose 2017-02-26 17:06:42 -05:00
commit 6b60015c02
9588 changed files with 1149251 additions and 49 deletions

30
node_modules/exit-hook/index.js generated vendored Normal file
View file

@ -0,0 +1,30 @@
'use strict';
var cbs = [];
var called = false;
function exit(exit, signal) {
if (called) {
return;
}
called = true;
cbs.forEach(function (el) {
el();
});
if (exit === true) {
process.exit(128 + signal);
}
};
module.exports = function (cb) {
cbs.push(cb);
if (cbs.length === 1) {
process.once('exit', exit);
process.once('SIGINT', exit.bind(null, true, 2));
process.once('SIGTERM', exit.bind(null, true, 15));
}
};

101
node_modules/exit-hook/package.json generated vendored Normal file
View file

@ -0,0 +1,101 @@
{
"_args": [
[
{
"raw": "exit-hook@^1.0.0",
"scope": null,
"escapedName": "exit-hook",
"name": "exit-hook",
"rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"/Users/jose/Documents/GitHub/Mods/node_modules/restore-cursor"
]
],
"_from": "exit-hook@>=1.0.0 <2.0.0",
"_id": "exit-hook@1.1.1",
"_inCache": true,
"_location": "/exit-hook",
"_npmUser": {
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
},
"_npmVersion": "1.4.9",
"_phantomChildren": {},
"_requested": {
"raw": "exit-hook@^1.0.0",
"scope": null,
"escapedName": "exit-hook",
"name": "exit-hook",
"rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/restore-cursor"
],
"_resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz",
"_shasum": "f05ca233b48c05d54fff07765df8507e95c02ff8",
"_shrinkwrap": null,
"_spec": "exit-hook@^1.0.0",
"_where": "/Users/jose/Documents/GitHub/Mods/node_modules/restore-cursor",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/exit-hook/issues"
},
"dependencies": {},
"description": "Run some code when the process exits",
"devDependencies": {
"ava": "0.0.4"
},
"directories": {},
"dist": {
"shasum": "f05ca233b48c05d54fff07765df8507e95c02ff8",
"tarball": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/sindresorhus/exit-hook",
"keywords": [
"exit",
"quit",
"process",
"hook",
"graceful",
"handler",
"shutdown",
"sigterm",
"sigint",
"terminate",
"kill",
"stop",
"event"
],
"license": "MIT",
"maintainers": [
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "exit-hook",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git://github.com/sindresorhus/exit-hook.git"
},
"scripts": {
"test": "node test.js"
},
"version": "1.1.1"
}

40
node_modules/exit-hook/readme.md generated vendored Normal file
View file

@ -0,0 +1,40 @@
# exit-hook [![Build Status](https://travis-ci.org/sindresorhus/exit-hook.svg?branch=master)](https://travis-ci.org/sindresorhus/exit-hook)
> Run some code when the process exits
The `process.on('exit')` event doesn't catch all the ways a process can exit.
Useful for cleaning up.
## Install
```sh
$ npm install --save exit-hook
```
## Usage
```js
var exitHook = require('exit-hook');
exitHook(function () {
console.log('exiting');
});
// you can add multiple hooks, even across files
exitHook(function () {
console.log('exiting 2');
});
throw new Error('unicorns');
//=> exiting
//=> exiting 2
```
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)