https://github.com/calibr/properties-file
.properties file parser
https://github.com/calibr/properties-file
Last synced: 5 months ago
JSON representation
.properties file parser
- Host: GitHub
- URL: https://github.com/calibr/properties-file
- Owner: calibr
- Created: 2015-09-25T17:01:16.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-09-25T17:30:01.000Z (over 10 years ago)
- Last Synced: 2023-08-20T23:52:43.262Z (almost 3 years ago)
- Language: JavaScript
- Size: 121 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Just parse .properties files which used in firefox localization
## Install
`npm i properties-file`
## Usage
### Parse .properties file
```js
var parser = require("properties-file");
var object = parser.parse(propertiesFileContents);
// object with key value strings
// for example if you have .properties file:
// str1=text1
// str2=text2
// you will get object like this:
// {
// "str1": "text1",
// "str2": "text2"
// }
```
### Generate properties file from object
```js
var parser = require("properties-file");
var string = parser.stringify({
str1: "text1",
str2: "text2"
});
// string will be
// str1=text1
// str2=text2
```