properties-reader
Advanced tools
Comparing version 0.2.0 to 0.3.0
{ | ||
"name": "properties-reader", | ||
"description": "Properties file reader for Node.js", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Steve King", |
@@ -13,3 +13,4 @@ Properties-Reader | ||
Or clone the repo https://github.com/steveukx/properties and include the `/src/PropertiesReader.js` script. | ||
Or clone the repo [git clone https://github.com/steveukx/properties](https://github.com/steveukx/properties) and | ||
import the `/src/PropertiesReader.js` script. | ||
@@ -72,2 +73,23 @@ API | ||
### Saving changes | ||
Once a file has been read and changes made, saving those changes to another file is as simple as running: | ||
``` | ||
// async/await ES6 | ||
const props = new PropertiesReader(filePath); | ||
await props.save(filePath); | ||
// tradtitonal | ||
const props = new PropertiesReader(filePath); | ||
// ES5 callback style | ||
props.save(filePath, function then(err, data) { ... }); | ||
// ES5 promise style | ||
props.save(filePath).then(onSaved, onSaveError); | ||
``` | ||
Data Types | ||
@@ -74,0 +96,0 @@ ========== |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
14119
104
0