New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

spring-config-parser

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spring-config-parser

Application for parsing spring configuration files

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

Spring Config Parser

A simple parser for Spring externalized configuration files.

It takes a yaml file + a set of active profiles and returns an object with the computed configuration.

Warning: This is highly untested and may only work for my specific use case. Use with caution.

Usage

const fs = require("fs")
const path = require("path")
const parser = require("spring-config-parser")

const filePath = path.join(__dirname, "application.yml")
const file = fs.readFileSync(filePath, "utf8")

const configForProfile = parser(file)

// Get the default configuration
configForProfile()

// Get the configuration for the "test" profile, merged with the default configuration
configForProfile("test")

// Get the configuration for the "test" and "ci" profiles,
// merged together with the default configuration
configForProfile(["test", "ci"])

See the tests for more examples

FAQs

Package last updated on 18 Jun 2017

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