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

yaml-cfn

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yaml-cfn

Parser and schema for CloudFormation YAML template tags.

  • 0.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
28K
decreased by-36.48%
Maintainers
1
Weekly downloads
 
Created
Source

yaml-cfn

CI npm version

Parser and schema for CloudFormation YAML template tags.

Implements support for AWS-specific CloudFormation YAML schema.

The implementation and tests are based on the official AWS Python client aws-cli. It supports all intrinsic CloudFormation functions listed in AWS docs as of October 2017.

Installation

npm install --save-dev yaml-cfn

Usage

const { yamlParse, yamlDump } = require('yaml-cfn');

const input = `
Key:
  - !GetAtt Foo.Bar
  - !Equals [!Ref Baz, "hello"]
`;

const parsed = {
  "Key": [
    {"Fn::GetAtt": ["Foo", "Bar"]},
    {"Fn::Equals": [{"Ref": "Baz"}, "hello"]}
  ]
};

assert.deepEqual(yamlParse(input), parsed);
assert.deepEqual(yamlParse(yamlDump(parsed)), parsed);

The module uses js-yaml. The schema it uses is also exported, and may be used e.g. like so:

const { schema } = require('yaml-cfn');
const yaml = require('js-yaml');
yaml.safeLoad(input, { schema: schema })

Keywords

FAQs

Package last updated on 28 Oct 2022

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