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

@firstaccess/analysis-outputs-mapper

Package Overview
Dependencies
Maintainers
9
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@firstaccess/analysis-outputs-mapper

Library that maps scoring outputs through the analysis schema collating data in some structure as defined by the analysis schema by:

  • 0.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
9
Weekly downloads
 
Created
Source

analysis-outputs-mapper

Library that maps scoring outputs through the analysis schema collating data in some structure as defined by the analysis schema by:

  • resolving values from the scoring outputs and the form data.
  • resolving formatting options from the analysis schema and the form configuration schema.

Installation

This module is distributed via npm and should be installed as one of your project's dependencies:

yarn add @firstaccess/analysis-outputs-mapper

Usage

import jsyaml from 'js-yaml';
import { mapOutputs } from '@firstaccess/analysis-outputs-mapper';

// or when using CJS modules:
// const { mapOutputs } = require('@firstaccess/analysis-outputs-mapper')

// Assuming the presence of an appraisal...
const analysisSchema = jsyaml.load(appraisal.workflow.analysisSchema.content);
const configurationSchema = appraisal.workflow.configuration.schema.schema;
const scoringResponse = JSON.parse(appraisal.scoring_response);
const outputs = scoringResponse.evaluation.outputs;
const data = appraisal.data;

const mappedOutputs = mapOutputs({
  analysisSchema,
  data,
  configurationSchema,
  outputs,
});

The mappedOutputs produced follow the sections structure dictated by the analysisSchema. See the analysis schema docs for more information on how this structure is created.

More usage examples can be found in the tests.

Contributing

  • Ensure your changes pass the precommit and prepush hooks. These should lint and format your code with EsLint and Prettier and run the tests with Jest.
  • Ensure your commits follow the conventional commits guidelines. Ultimately, this will enable the generation of automated changelogs as well as computed version numbers.

FAQs

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