Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@mind029/json2schema

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mind029/json2schema

JSON文件或者JavaScript对象转换成JSON-SCHEMA校验规则对象。

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

json2schema

JSON文件或者JavaScript对象转换成JSON-SCHEMA校验规则对象。

安装


npm install @mind029/json2schema --save

Node.js 用法

const Convert = require("@mind029/json2schema")
const c = new Convert()
const data = {
  id:1,
  name:"mind",
  age:18
}
// 生成的schema结构
const schema = c.format(data)

FAQs

Package last updated on 06 Sep 2018

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