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

json-schema-poet

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

json-schema-poet

[JSON Schema](https://json-schema.org) is a useful way to define input and output schemas.

  • 0.0.9
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

json-schema-poet

JSON Schema is a useful way to define input and output schemas.

Typescript is a useful way to verify the types of JavaScript objects.

json-schema-strictly-poet Write JSON Schema like you'd write poetry.

Example

import * as jsp from "json-schema-poet";

test("integer yields number schema", () => {
  expect(jsp.integer()).toEqual({ type: "integer" });
});

API

Here are all of the functions in the API.

  • nul()
  • cnst()
  • integer()
  • number()
  • string()
  • stringEnum()
  • numberEnum()
  • integerEnum()
  • regex()
  • boolean()
  • array()
  • tuple()
  • allOf()
  • anyOf()
  • oneOf()
  • not()
  • dictionary()
  • type()
  • object()
  • extend()

Todo

There is plenty of stuff that is not implemented yet. I'd really appreciate your help!

FAQs

Package last updated on 27 Sep 2019

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