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

@percy/config

Package Overview
Dependencies
Maintainers
1
Versions
241
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@percy/config

Handles loading and adding options to Percy configuration files. Uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) to load configuration files and [JSON schema](https://json-schema.org/) with [AJV](https://github.com/epoberezkin/ajv) to val

  • 1.28.8-beta.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
123K
decreased by-62.9%
Maintainers
1
Weekly downloads
 
Created

What is @percy/config?

@percy/config is a configuration management package for Percy, a visual testing and review platform. It allows users to define and manage configuration settings for Percy in a structured and programmatic way.

What are @percy/config's main functionalities?

Load Configuration

This feature allows you to load the configuration settings for Percy from a configuration file. The `load` function reads the configuration and returns it as a JavaScript object.

const { load } = require('@percy/config');
const config = load();
console.log(config);

Validate Configuration

This feature allows you to validate a given configuration object against the expected schema. The `validate` function returns an object indicating whether the configuration is valid and any errors if it is not.

const { validate } = require('@percy/config');
const config = { version: 2, snapshots: { widths: [375, 1280] } };
const { valid, errors } = validate(config);
console.log(valid, errors);

Merge Configuration

This feature allows you to merge multiple configuration objects into one. The `merge` function takes two or more configuration objects and combines them, with later objects overriding earlier ones.

const { merge } = require('@percy/config');
const baseConfig = { version: 2, snapshots: { widths: [375] } };
const overrideConfig = { snapshots: { widths: [1280] } };
const mergedConfig = merge(baseConfig, overrideConfig);
console.log(mergedConfig);

Other packages similar to @percy/config

FAQs

Package last updated on 06 Jun 2024

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