Comparing version 0.0.7 to 0.0.8
15
index.js
@@ -71,14 +71,9 @@ /* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. | ||
my_fs.load_json = async filepath => { | ||
JSON.parse(await my_fs.readFile(filepath, "utf8")); | ||
return JSON.parse(await my_fs.readFile(filepath, "utf8")); | ||
}; | ||
my_fs.save_json = async (filepath, data) => { | ||
data = JSON.stringify(data, null, 4); | ||
return promise_wrapper((resolve, reject) => { | ||
fs.writeFile( | ||
filepath, data, "utf8", | ||
err => err ? reject(err) : resolve() | ||
); | ||
}); | ||
}; | ||
my_fs.save_json = async_wrapper(async (filepath, data, indent = 4) => { | ||
data = JSON.stringify(data, null, indent); | ||
await my_fs.writeFile(filepath, data, "utf8"); | ||
}); | ||
@@ -85,0 +80,0 @@ my_fs.read_bytes = async_wrapper(async function (filepath, { |
{ | ||
"name": "@jeefo/fs", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"homepage": "https://github.com/je3f0o/fs", | ||
@@ -5,0 +5,0 @@ "copyright": "2020", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7594
152