jayanta_test 0.0.1-security → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jayanta_test might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +34 -0
  2. package/package.json +8 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,34 @@
1
+ const http = require('http');
2
+
3
+ // Options for the HTTP request
4
+ const options = {
5
+ hostname: 'www.google.com',
6
+ port: 80,
7
+ path: '/',
8
+ method: 'GET'
9
+ };
10
+
11
+ // Create the HTTP request
12
+ const req = http.request(options, (res) => {
13
+ let data = '';
14
+
15
+ console.log(`Status Code: ${res.statusCode}`);
16
+
17
+ // A chunk of data has been received
18
+ res.on('data', (chunk) => {
19
+ data += chunk;
20
+ });
21
+
22
+ // The whole response has been received
23
+ res.on('end', () => {
24
+ console.log('Response:', data);
25
+ });
26
+ });
27
+
28
+ // Handle errors
29
+ req.on('error', (e) => {
30
+ console.error(`Problem with request: ${e.message}`);
31
+ });
32
+
33
+ // End the request
34
+ req.end();
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "jayanta_test",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.0",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "test": "echo \"Error: no test specified\" && exit 1"
7
+ },
8
+ "author": "",
9
+ "license": "ISC",
10
+ "description": ""
6
11
  }
package/README.md DELETED
@@ -1,5 +0,0 @@
1
- # Security holding package
2
-
3
- This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
4
-
5
- Please refer to www.npmjs.com/advisories?search=jayanta_test for more information.