https://github.com/neocotic/properties-store
Store for .properties files in Node.js
https://github.com/neocotic/properties-store
javascript nodejs properties store
Last synced: 4 months ago
JSON representation
Store for .properties files in Node.js
- Host: GitHub
- URL: https://github.com/neocotic/properties-store
- Owner: neocotic
- License: mit
- Created: 2016-08-26T17:49:46.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-10T00:26:09.000Z (over 6 years ago)
- Last Synced: 2025-02-28T22:37:58.977Z (5 months ago)
- Topics: javascript, nodejs, properties, store
- Language: JavaScript
- Homepage:
- Size: 1.34 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# properties-store
[](https://travis-ci.org/neocotic/properties-store)
[](https://github.com/neocotic/properties-store/blob/master/docs/api.md)
[](https://codecov.io/gh/neocotic/properties-store)
[](https://david-dm.org/neocotic/properties-store)
[](https://david-dm.org/neocotic/properties-store?type=dev)
[](https://github.com/neocotic/properties-store/blob/master/LICENSE.md)
[](https://www.npmjs.com/package/properties-store)[properties-store](https://github.com/neocotic/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)
* [API](#api)
* [Bugs](#bugs)
* [Contributors](#contributors)
* [License](#license)## Install
Install using `npm`:
``` bash
$ npm install --save properties-store
```You'll need to have at least [Node.js](https://nodejs.org) 8 or newer.
## API
new PropertiesStore([store][, options])
The complete API documentation, along with lots of examples, can be found
[here](https://github.com/neocotic/properties-store/blob/master/docs/api.md).``` javascript
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](https://github.com/neocotic/properties-store/issues).## Contributors
If you want to contribute, you're a legend! Information on how you can do so can be found in
[CONTRIBUTING.md](https://github.com/neocotic/properties-store/blob/master/CONTRIBUTING.md). We want your suggestions
and pull requests!A list of contributors can be found in
[AUTHORS.md](https://github.com/neocotic/properties-store/blob/master/AUTHORS.md).## License
Copyright © 2018 Alasdair Mercer
See [LICENSE.md](https://github.com/neocotic/properties-store/raw/master/LICENSE.md) for more information on our MIT
license.