0.3.0 • Published 5 years ago

properties-store v0.3.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

properties-store

Build Status Documentation Coverage Dependency Status Dev Dependency Status License Release

properties-store is a Node.js library for working with .properties file stores with an API based closely on that of ECMAScript's Map.

Install

Install using npm:

$ npm install --save properties-store

You'll need to have at least Node.js 8 or newer.

API

new PropertiesStore([store][, options])

The complete API documentation, along with lots of examples, can be found here.

const properties = new PropertiesStore();
await properties.load(fs.createReadStream('path/to/my.properties'));

properties.set('new-prop', 'Hello, World!');
properties.get('new-prop');
//=> "Hello, World!"

properties.get('missing-prop', 'Some default value');
//=> "Some default value"

await properties.store(fs.createWriteStream('path/to/my.properties'));

Bugs

If you have any problems with this library or would like to see changes currently in development you can do so here.

Contributors

If you want to contribute, you're a legend! Information on how you can do so can be found in CONTRIBUTING.md. We want your suggestions and pull requests!

A list of contributors can be found in AUTHORS.md.

License

Copyright © 2018 Alasdair Mercer

See LICENSE.md for more information on our MIT license.