https://github.com/nathan818fr/node-java-props
Read/Parse Java .properties files (using the same specification) in Javascript / Node.js.
https://github.com/nathan818fr/node-java-props
java java-properties nodejs properties-parser
Last synced: 27 days ago
JSON representation
Read/Parse Java .properties files (using the same specification) in Javascript / Node.js.
- Host: GitHub
- URL: https://github.com/nathan818fr/node-java-props
- Owner: nathan818fr
- License: mit
- Created: 2018-08-22T12:11:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-02-03T19:41:32.000Z (about 4 years ago)
- Last Synced: 2025-10-12T05:52:59.079Z (4 months ago)
- Topics: java, java-properties, nodejs, properties-parser
- Language: TypeScript
- Homepage:
- Size: 739 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# java-props
[](https://www.npmjs.com/package/java-props)

[](https://app.travis-ci.com/nathan818fr/node-java-props)
[](https://codecov.io/gh/nathan818fr/node-java-props)
Read/Parse Java .properties files (using EXACTLY the same [specification](https://docs.oracle.com/javase/10/docs/api/java/util/Properties.html#load%28java.io.Reader%29)) in Javascript (browser) and Node.js.
This module provides its own TypeScript declarations (.d.ts).
## Installation
```bash
npm install java-props
```
## Example
```properties
# file.properties
a = Hello World
b : Node.js\u00AE
c value
d=foo\
bar
```
```javascript
const javaProps = require('java-props');
javaProps
.parseFile('./file.properties')
.then((props) => {
console.log(props);
// { a: 'Hello World', b: 'Node.js®', c: 'value', d: 'foobar' }
})
.catch((err) => {
console.error(err);
});
```
## Documentation
For a detailed API reference, see:
[node-java-props.nathan818.fr](https://node-java-props.nathan818.fr/modules.html)
## Building
This project uses TypeScript. To create javascript sources run:
```sh
yarn run build
```
## Testing
To run the test suite, first install the dependencies, then run `yarn test`:
```bash
yarn install
yarn test
```
## Contributing
Contributions are welcome.
The goal is to keep a simple project without unnecessary (non essential) features.
It is recommended to open an issue before introducing new features to discuss them.
## Versioning
We use [SemVer](http://semver.org/) for versioning.
For the versions available, see the [tags on this repository](https://github.com/nathan818fr/node-java-props/tags).
## Authors
- [Nathan Poirier](https://github.com/nathan818fr) <nathan@poirier.io>
## License
This project is licensed under the MIT License.
See the [LICENSE](https://github.com/nathan818fr/node-java-props/blob/master/LICENSE) file for details.