New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

properties-to-object

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

properties-to-object - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

8

package.json
{
"name": "properties-to-object",
"version": "1.0.0",
"version": "1.0.1",
"description": "Parse property file structures into object structures",

@@ -18,2 +18,6 @@ "main": "index.js",

],
"repository": {
"type": "git",
"url": "git+https://github.com/winner-potential/properties-to-object.git"
},
"license": "MIT",

@@ -23,2 +27,2 @@ "devDependencies": {

}
}
}
# Parse Properties to Objects
Simple parser to handle property file based key names and parse them into objects.
Simple parser to handle property file based key names and parse them into objects. The key name separations with points is transferred into an object structure.

@@ -16,2 +16,27 @@ ```

console.log(config.some.property);
```
## Use with Spring Cloud Config
This node module is intended to be used in combination with results from spring cloud configuration servers as provided by using the module [cloud-config-client](https://github.com/victorherraiz/cloud-config-client).
```
npm install cloud-config-client properties-to-object --save
```
``` javascript
const client = require("cloud-config-client")
const parser = require("properties-to-object")
client.load({
application: "invoices"
}).then((config) => {
// Rebuild config from server into map with key value pairs
var result = {}
config.forEach((k,v) => {
result[k] = v
}
// Use parser to create configuration object
var configuration = parser(result)
});
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc