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

tson-schema

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tson-schema - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

dist/ts-json-schema.d.ts

2

package.json
{
"name": "tson-schema",
"version": "0.1.1",
"version": "0.1.2",
"description": "A TypeScript API to create JSON-Schemas and TypeScript types",

@@ -5,0 +5,0 @@ "files": [

@@ -60,2 +60,12 @@ # tson-schema

objectSchema.type // { req: 'string', opt?: [number] }
/**
* Enum
*/
const enumSchema = t.enum({
enum: ['A', 2, 'C', 4]
})
enumSchema.getSchema() // { enum: ['A', 2, 'C', 4] }
enumSchema.type // 'A' | 2 | 'C' | 4
```
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