Comparing version 0.0.5 to 0.0.6
21
index.js
@@ -60,18 +60,19 @@ /* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. | ||
my_fs.readFile = (filepath, options) => promise_wrapper((resolve, reject) => { | ||
my_fs.readFile = (fp, options = {}) => promise_wrapper((resolve, reject) => { | ||
fs.readFile( | ||
filepath, options, | ||
(err, data) => err ? reject(err) : resolve(data) | ||
fp, options, (err, data) => err ? reject(err) : resolve(data) | ||
); | ||
}); | ||
my_fs.writeFile = (fp, data, options) => promise_wrapper((resolve, reject) => { | ||
fs.writeFile( | ||
fp, data, options, | ||
(err, data) => err ? reject(err) : resolve(data) | ||
); | ||
}); | ||
my_fs.writeFile = (fp, data, options = {}) => promise_wrapper( | ||
(resolve, reject) => { | ||
fs.writeFile( | ||
fp, data, options, err => err ? reject(err) : resolve() | ||
); | ||
} | ||
); | ||
my_fs.load_json = async filepath => | ||
my_fs.load_json = async filepath => { | ||
JSON.parse(await my_fs.readFile(filepath, "utf8")); | ||
}; | ||
@@ -78,0 +79,0 @@ my_fs.save_json = async (filepath, data) => { |
{ | ||
"name": "@jeefo/fs", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"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
158
7796