ctrl-c 2.3.2 → 2.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015-20 Ionică Bizău <bizauionica@gmail.com> (https://ionicabizau.net)
3
+ Copyright (c) 2015-26 Ionică Bizău <bizauionica@gmail.com> (https://ionicabizau.net)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,52 +1,13 @@
1
1
  <!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->
2
2
 
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
3
  # ctrl-c
21
4
 
22
- [![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [![Ask me anything](https://img.shields.io/badge/ask%20me-anything-1abc9c.svg)](https://github.com/IonicaBizau/ama) [![Version](https://img.shields.io/npm/v/ctrl-c.svg)](https://www.npmjs.com/package/ctrl-c) [![Downloads](https://img.shields.io/npm/dt/ctrl-c.svg)](https://www.npmjs.com/package/ctrl-c) [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/johnnyb?utm_source=github&utm_medium=button&utm_term=johnnyb&utm_campaign=github)
5
+ [![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [![Ask me anything](https://img.shields.io/badge/ask%20me-anything-1abc9c.svg)](https://github.com/IonicaBizau/ama) [![Version](https://img.shields.io/npm/v/ctrl-c.svg)](https://www.npmjs.com/package/ctrl-c) [![Downloads](https://img.shields.io/npm/dt/ctrl-c.svg)](https://www.npmjs.com/package/ctrl-c) [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/@johnnyb?utm_source=github&utm_medium=button&utm_term=johnnyb&utm_campaign=github)
23
6
 
24
7
  <a href="https://www.buymeacoffee.com/H96WwChMy" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png" alt="Buy Me A Coffee"></a>
25
8
 
26
-
27
-
28
-
29
-
30
-
31
-
32
9
  > Allows you to ignore the CTRL + C keypress
33
10
 
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
11
  ## :cloud: Installation
51
12
 
52
13
  ```sh
@@ -57,22 +18,8 @@ npm install --save ctrl-c
57
18
  yarn add ctrl-c
58
19
  ```
59
20
 
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
21
  ## :clipboard: Example
73
22
 
74
-
75
-
76
23
  ```js
77
24
  // Dependencies
78
25
  var CtrlC = require("ctrl-c");
@@ -100,122 +47,50 @@ setInterval(function () {
100
47
  }, 500);
101
48
  ```
102
49
 
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
- ## :question: Get Help
114
-
115
- There are few ways to get help:
116
-
117
-
118
-
119
- 1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long you add a link to your Stack Overflow question.
120
- 2. For bug reports and feature requests, open issues. :bug:
121
- 3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:
122
-
123
-
124
-
125
-
126
-
127
50
  ## :memo: Documentation
128
51
 
129
-
130
52
  ### `CtrlC(ign)`
131
53
  Ignores or not the CTRL + C keypress.
132
54
 
133
55
  #### Params
134
-
135
56
  - **Boolean** `ign`: A boolean flag representing if the CTRL + C press should be ignored or not.
136
57
 
137
58
  ### `onPress()`
138
59
  A custom handler for CTRL + C press. The default handler
139
60
  will close the process with zero exit code.
140
61
 
62
+ ## :question: Get Help
141
63
 
64
+ There are a few ways to get help:
142
65
 
66
+ 1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long as you add a link to your Stack Overflow question.
67
+ 2. For bug reports and feature requests, open issues. :bug:
68
+ 3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:
143
69
 
70
+ ## :yum: How to Contribute
144
71
 
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
- ## :yum: How to contribute
155
72
  Have an idea? Found a bug? See [how to contribute][contributing].
156
73
 
74
+ ## :sparkling_heart: Support My Projects
157
75
 
158
- ## :sparkling_heart: Support my projects
159
- I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously,
160
- this takes time. You can integrate and use these projects in your applications *for free*! You can even change the source code and redistribute (even resell it).
161
-
162
- However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
76
+ I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications *for free*! You can even change the source code and redistribute it (even resell it).
163
77
 
78
+ However, if you get some profit from this or just want to encourage me to continue creating stuff, there are a few ways you can do it:
164
79
 
165
80
  - Starring and sharing the projects you like :rocket:
166
- - [![Buy me a book][badge_amazon]][amazon]—I love books! I will remember you after years if you buy me one. :grin: :book:
81
+ - [![Buy me a book][badge_amazon]][amazon]—I love books! I will remember you for years if you buy me one. :grin: :book:
167
82
  - [![PayPal][badge_paypal]][paypal-donations]—You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:
168
83
  - [![Support me on Patreon][badge_patreon]][patreon]—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).
169
- - **Bitcoin**—You can send me bitcoins at this address (or scanning the code below): `1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6`
170
-
171
- ![](https://i.imgur.com/z6OQI95.png)
84
+ - **Bitcoin**—You can send me bitcoins at this address (or by scanning the code below): `1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6`
172
85
 
86
+ ![Bitcoin QR code](https://i.imgur.com/z6OQI95.png)
173
87
 
174
88
  Thanks! :heart:
175
89
 
176
-
177
-
178
-
179
-
180
-
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
- ## :dizzy: Where is this library used?
192
- If you are using this library in one of your projects, add it in this list. :sparkles:
193
-
194
- - `markserv-cli`
195
- - `zmey-gorynych`
196
- - `share-term`
197
- - `ipwnedyou`
198
- - `3abn`
199
-
200
-
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
90
  ## :scroll: License
211
91
 
212
92
  [MIT][license] © [Ionică Bizău][website]
213
93
 
214
-
215
-
216
-
217
-
218
-
219
94
  [license]: /LICENSE
220
95
  [website]: https://ionicabizau.net
221
96
  [contributing]: /CONTRIBUTING.md
@@ -225,5 +100,5 @@ If you are using this library in one of your projects, add it in this list. :spa
225
100
  [badge_paypal]: https://ionicabizau.github.io/badges/paypal.svg
226
101
  [badge_paypal_donate]: https://ionicabizau.github.io/badges/paypal_donate.svg
227
102
  [patreon]: https://www.patreon.com/ionicabizau
228
- [amazon]: http://amzn.eu/hRo9sIZ
103
+ [amazon]: https://amzn.eu/hRo9sIZ
229
104
  [paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVXDDLKKLQRJW
package/lib/index.js CHANGED
@@ -1,5 +1,3 @@
1
- "use strict";
2
-
3
1
  // Dependencies
4
2
  var Keypress = require("keypress");
5
3
  Keypress(process.stdin);
@@ -36,4 +34,4 @@ process.stdin.on("keypress", function (ch, key) {
36
34
  }
37
35
  });
38
36
 
39
- module.exports = CtrlC;
37
+ module.exports = CtrlC;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ctrl-c",
3
- "version": "2.3.2",
3
+ "version": "2.3.4",
4
4
  "description": "Allows you to ignore the CTRL + C keypress",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -38,8 +38,9 @@
38
38
  "menu/",
39
39
  "cli.js",
40
40
  "index.js",
41
+ "index.d.ts",
41
42
  "bloggify.js",
42
43
  "bloggify.json",
43
44
  "bloggify/"
44
45
  ]
45
- }
46
+ }