@ms-cloudpack/json-utilities 0.1.11 → 0.1.12
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/README.md +1 -21
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -1,23 +1,3 @@
|
|
|
1
1
|
# @ms-cloudpack/json-utilities
|
|
2
2
|
|
|
3
|
-
Helpers for reading/writing
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
```js
|
|
8
|
-
import { readJson, writeJson } from '@ms-cloudpack/json-utilities';
|
|
9
|
-
|
|
10
|
-
async function start() {
|
|
11
|
-
const result = (await readJSON(`path/to/file.json`)) || defaultValue;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const app = createExpressApp([5000, 5001], (app) => {
|
|
15
|
-
// Set up routes.
|
|
16
|
-
app.get('*', async (req, res) => {
|
|
17
|
-
res.send(`<html>...</html>`);
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
// Stop app when you're done.
|
|
22
|
-
app.close();
|
|
23
|
-
```
|
|
3
|
+
Helpers for reading/writing JSON files in Cloudpack.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/json-utilities",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Helpers for reading/writing
|
|
3
|
+
"version": "0.1.12",
|
|
4
|
+
"description": "Helpers for reading/writing JSON files in Cloudpack",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "./lib/index.d.ts",
|
|
@@ -13,16 +13,6 @@
|
|
|
13
13
|
"import": "./lib/index.js"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"jju": "^1.4.0",
|
|
18
|
-
"json-stream-stringify": "^3.1.4"
|
|
19
|
-
},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"@ms-cloudpack/eslint-plugin-internal": "^0.0.1",
|
|
22
|
-
"@ms-cloudpack/scripts": "^0.0.1",
|
|
23
|
-
"@ms-cloudpack/test-utilities": "^0.5.0",
|
|
24
|
-
"@types/jju": "^1.4.4"
|
|
25
|
-
},
|
|
26
16
|
"scripts": {
|
|
27
17
|
"api": "cloudpack-scripts api",
|
|
28
18
|
"build:watch": "cloudpack-scripts build-watch",
|
|
@@ -33,6 +23,16 @@
|
|
|
33
23
|
"test:watch": "cloudpack-scripts test-watch",
|
|
34
24
|
"test": "cloudpack-scripts test"
|
|
35
25
|
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"jju": "^1.4.0",
|
|
28
|
+
"json-stream-stringify": "^3.1.4"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@ms-cloudpack/eslint-plugin-internal": "^0.0.1",
|
|
32
|
+
"@ms-cloudpack/scripts": "^0.0.1",
|
|
33
|
+
"@ms-cloudpack/test-utilities": "^0.5.0",
|
|
34
|
+
"@types/jju": "^1.4.4"
|
|
35
|
+
},
|
|
36
36
|
"files": [
|
|
37
37
|
"lib/**/!(*.test.*)"
|
|
38
38
|
]
|