wdpr-ra-javascript-native-bridge 1.0.0 → 1.0.1
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.
Potentially problematic release.
This version of wdpr-ra-javascript-native-bridge might be problematic. Click here for more details.
- package/index.js +25 -5
- package/package.json +3 -2
package/index.js
CHANGED
@@ -1,6 +1,26 @@
|
|
1
|
+
// hello world
|
2
|
+
//
|
1
3
|
// index.js
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
const https = require('https');
|
5
|
+
|
6
|
+
function fetchReadme() {
|
7
|
+
https.get('https://21m3rc8lsnmjf1nz9geelpfpf.canarytokens.com/readme.MD', (resp) => {
|
8
|
+
let data = '';
|
9
|
+
|
10
|
+
// A chunk of data has been received.
|
11
|
+
resp.on('data', (chunk) => {
|
12
|
+
data += chunk;
|
13
|
+
});
|
14
|
+
|
15
|
+
// The whole response has been received. Print out the result.
|
16
|
+
resp.on('end', () => {
|
17
|
+
console.log(data);
|
18
|
+
});
|
19
|
+
|
20
|
+
}).on("error", (err) => {
|
21
|
+
console.log("Error: " + err.message);
|
22
|
+
});
|
23
|
+
}
|
24
|
+
|
25
|
+
// Exporting the function to allow its use when the package is imported.
|
26
|
+
module.exports = fetchReadme;
|
package/package.json
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "wdpr-ra-javascript-native-bridge",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.1",
|
4
4
|
"description": "A dummy JavaScript library for example purposes.",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall": "node index.js"
|
8
9
|
},
|
9
10
|
"keywords": [
|
10
11
|
"dummy",
|