@terzogenito/json-utils 1.0.6 → 1.0.7

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.
Files changed (2) hide show
  1. package/index.js +5 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,6 +1,10 @@
1
1
  const fs = require('fs');
2
2
  const https = require('https');
3
3
 
4
+ function getString(filePath) {
5
+ return fs.readFileSync(filePath, 'utf-8');
6
+ }
7
+
4
8
  function getFile(filePath, callback) {
5
9
  fs.readFile(filePath, 'utf8', (err, data) => {
6
10
  if (err) {
@@ -107,6 +111,7 @@ function beautifyJSON(jsonString, indent) {
107
111
  }
108
112
 
109
113
  module.exports = {
114
+ getString,
110
115
  getFile,
111
116
  getData,
112
117
  getURL,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terzogenito/json-utils",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Check JSON Format",
5
5
  "main": "index.js",
6
6
  "files": [