@terzogenito/json-utils 1.0.1 → 1.0.3

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/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@terzogenito/json-utils",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Check JSON Format",
5
5
  "main": "index.js",
6
+ "files": [
7
+ "index.js"
8
+ ],
6
9
  "scripts": {
7
10
  "start": "node test.js",
8
11
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -10,6 +13,17 @@
10
13
  "publishConfig": {
11
14
  "access": "public"
12
15
  },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/terzogenito/json-utils.git"
19
+ },
20
+ "bugs": {
21
+ "url": "https://github.com/terzogenito/json-utils/issues"
22
+ },
23
+ "homepage": "https://github.com/terzogenito/json-utils#readme",
24
+ "engines": {
25
+ "node": ">=21.6.1"
26
+ },
13
27
  "keywords": [
14
28
  "nodejs",
15
29
  "module",
@@ -1,36 +0,0 @@
1
- name: Publish to npm
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
-
8
- jobs:
9
- publish:
10
- runs-on: ubuntu-latest
11
-
12
- steps:
13
- - name: Checkout code
14
- uses: actions/checkout@v3
15
-
16
- - name: Setup Node.js
17
- uses: actions/setup-node@v3
18
- with:
19
- node-version: 16
20
- registry-url: https://registry.npmjs.org/
21
-
22
- - name: Install dependencies
23
- run: npm install
24
-
25
- - name: Bump version and publish to npm
26
- run: |
27
- npm version patch # Automatically bump the version
28
- # Increment PATCH version
29
- # npm version patch # For a bug fix (1.0.0 → 1.0.1)
30
- # Increment MINOR version
31
- # npm version minor # For new features (1.0.0 → 1.1.0)
32
- # Increment MAJOR version
33
- # npm version major # For breaking changes (1.0.0 → 2.0.0)
34
- npm publish
35
- env:
36
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/data.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "name": "John",
3
- "age": 30,
4
- "isActive": true
5
- }
package/test.js DELETED
@@ -1,22 +0,0 @@
1
- const app = require('./index');
2
-
3
- var sampleData = '{"name":"John","age":30,"isActive":true}';
4
-
5
- (async () => {
6
- console.log(await app.getData('./data.json'));
7
- })();
8
-
9
- app.getFile('data.json',data=>{
10
- console.log(app.isValid(data));
11
- });
12
-
13
- app.getJSON('data.json',data=>{
14
- console.log(app.toString(data));
15
- });
16
-
17
- console.log(app.readJSON(sampleData));
18
-
19
- console.log(app.isJSON(sampleData));
20
-
21
- console.log(app.beautifyJSON(sampleData));
22
- console.log(app.beautifyJSON(sampleData, 4));