1.0.2 • Published 3 years ago

prodata-app v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

How to run this project?

  1. If NodeJS not installed in your system. Install it from Here.
  2. Clone the repository.
  3. Run command npm i in root folder to install dependencies.
  4. Run command npm run build in the root folder to build.
  5. Run command npm run test in the root folder to test.
  6. That's it.

Installation

npm i prodata-app

Code Sample

const { parseJsonFile } = require("prodata-app");
parseJsonFile("./files/demo.json").then((res) => console.log(res));

Inputs & Outputs

The input files are from here

First input file 1.json The output

{
	"message": [
		{ 
			"node": 1,
			"result": true
		}
	]
}

Second input file 2.json The output

{
	"message": [
		{
			"node": 1,
			"result": false
		},
		{
			"node": 2,
			"result": false
		},
		{
			"node": 3,
			"result": true
		}
	]
}

Functions

There are two functions

  • parseJsonFile
  • parseJsonString

ParseJsonFile()

  • @params : String. JSON file path
  • @returns : Promise. A JSON format text
  • @type: : async

ParseJsonString()

  • @params : String. JSON string
  • @returns : String. A JSON format text
  • @type: : sync
1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago