Use .properties files in Node.js
npm install praseodymiumbash
npm i praseodymium
`API
$3
Initialize by calling new propertiesReader(). ECMAScript import is also supported.
`js
const propertiesReader = require('praseodymium')
const Reader = new propertiesReader('/file/path', { separatedBy:"=" })
`| Parameter | Description |
| ----------- | ----------- |
| File | The file path to read |
| advanced.separatedBy | Change what key/values are separated by (default: =) |
$3
Get one
`js
Reader.get('key')
`| Parameter | Description |
| ----------- | ----------- |
| key | The key to get the value of |
Get all
`js
Reader.getAll()
`
Get raw content as a string
`js
Reader.getRaw()
`
$3
`js
Reader.set('key','value')
`| Parameter | Description |
| ----------- | ----------- |
| key | The key to set the value of |
$3
Convert to JSON
`js
Reader.toJSON()
`
Convert to an Array
`js
Reader.toArray()
`
Convert a JSON object to the .properties file syntax
`js
Reader.toProperties({ key:"value" }, "output")
``Report feedback & bugs here
Like our work? Support us on Patreon