Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@buttercup/config

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@buttercup/config

Configuration utility

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
2
Weekly downloads
 
Created
Source

Config

Configuration utility

Build Status

About

This library provides tools for configuring Buttercup entities and applications. Buttercup Archives, Groups and Entries can be configured easily, as well as raw objects for general application support (settings pages etc.).

Installation

Run npm install @buttercup/config --save to install and save the library.

Usage

Configuring Buttercup entities is easy:

const { Archive } = require("buttercup");
const { configureButtercup } = require("@buttercup/config");

const archive = Archive.createWithDefaults();
const config = configureButtercup(archive);
config.set("test.value", 123);
config.apply();

Use the configureButtercup(entity) method to configure instances, and use the config#apply() method to apply the configuration (write it to the instance). Buttercup configurations are stored using attribute values.

Objects are written in a nested manner, whilst arrays are written directly. This means that objects can be composed and merged (especially during merge conflicts), but arrays are overwritten (including nested objects). It is therefore advised to keep configurations simple: Use nestedness sparingly and expect that arrays will never be merged.

Keywords

FAQs

Package last updated on 23 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