Socket
Socket
Sign inDemoInstall

@aliceplex/schema

Package Overview
Dependencies
10
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @aliceplex/schema

JavaScript package to validate Alice Plex Schema.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
2.22 MB
Created
Weekly downloads
 

Readme

Source

@aliceplex/schema

JavaScript package to validate Alice Plex Schema.

For full documentation, check out here.

Install

npm install @aliceplex/schema

Usage

JSON Schema

Current the schemas are written in JSON Schema Draft 7.

They can be found in src/lib/schema. They can also be accessed through the url in $id.

CLI

> vps -h

usage: Validate Plex Schema [-h] [-v] -t {show,movie,album,artist}
                            [-f {fast,full}] [--first-error]
                            files [files ...]

Positional arguments:
  files                 File to be validate

Optional arguments:
  -h, --help            Show this help message and exit.
  -v, --version         Show program's version number and exit.
  -t {show,movie,album,artist}, --type {show,movie,album,artist}
                        Validate type
  -f {fast,full}, --format {fast,full}
                        Format type
  --first-error         Stop at first error

JavaScript Package

import { Schemas, validateSchema } from "@aliceplex/schema";

const yaml = loadYaml("show.yaml"); // Implementation loadYaml yourself
const result = validateSchema(Schemas.Show, yaml);

if (result.valid) {
  console.log(result.data);
} else {
  console.log(result.errors);
}

Keywords

FAQs

Last updated on 06 Mar 2019

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