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

Parse property file structures into object structures

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

Parse Properties to Objects

Build Status

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.

npm install properties-to-object --save
const parser = require("properties-to-object");
var config = parser({
    "some.property": "value",
    "other": "123"
});
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.

npm install cloud-config-client properties-to-object --save
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)
});

Keywords

FAQs

Package last updated on 29 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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