Socket
Socket
Sign inDemoInstall

homeassistant-js-yaml-schema

Package Overview
Dependencies
2
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    homeassistant-js-yaml-schema

Schema to allow js-yaml to process YAML formatted Home Assistent templates that use Home Assistent specific local tags while parsing or dumping.


Version published
Weekly downloads
18
increased by157.14%
Maintainers
1
Install size
569 kB
Created
Weekly downloads
 

Readme

Source

homeassistant-js-yaml-schema

Coverage Status

Schema to allow js-yaml to process YAML formatted Home Assistent templates that use Home Assistent specific local tags while parsing or dumping, for example: !env_var, !include_dir_named.

See tags.json for currently supported local tags.

Usage

const jsyaml = require('js-yaml');
const fs     = require('fs');
import { HOMEASSISTANT_SCHEMA } from "homeassistant-js-yaml-schema"

let doc = yaml.load(fs.readFileSync('/path/to/file.yml', 'utf8'));
let body = jsyaml.load(doc, { schema: HOMEASSISTANT_SCHEMA });
console.log(JSON.stringify(body, null, 2));

body = jsyaml.dump(body, { schema: HOMEASSISTANT_SCHEMA });
console.log(body);

See usage in vscode-yaml-sort.

License

homeassistant-js-yaml-schema is licensed under the MIT License.

Keywords

FAQs

Last updated on 10 Jan 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc