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

js-yaml-cloudformation-schema

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-yaml-cloudformation-schema

Schema to allow js-yaml to process YAML formatted CloudFormation templates that use short form syntax for intrinsic functions while parsing or dumping

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
84K
increased by6.03%
Maintainers
1
Weekly downloads
 
Created
Source

js-yaml-cloudformation-schema Build Status

Schema to allow js-yaml to process YAML formatted CloudFormation templates that use short form syntax for intrinsic functions while parsing or dumping, for example: !Ref, !Base64.

See tags.json for currently supported short form syntax for intrinsic functions, also known as local tags in the YAML spec.

This is a fork of yyolk/cloudformation-js-yaml-schema that changes the structure of the parsed JavaScript representation of the CloudFormation template to match the parsed representation of a JSON formatted CloudFormation template.

Usage

const yaml = require('js-yaml');
const { CLOUDFORMATION_SCHEMA } = require('js-yaml-cloudformation-schema');

let templateBody = fs.readFileSync(templatePath, 'utf8');
templateBody = yaml.safeLoad(templateBody, { schema: CLOUDFORMATION_SCHEMA });
console.log(JSON.stringify(templateBody, null, 2));

templateBody = yaml.safeDump(templateBody, { schema: CLOUDFORMATION_SCHEMA });
console.log(templateBody);

Keywords

FAQs

Package last updated on 04 Oct 2020

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