0.0.14 • Published 8 months ago

@zhinjs/schema v0.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@zhinjs/schema

zhin配置声明

声明number

Schema.number()

声明string

Schema.string()

声明boolean

Schema.boolean()

声明date

Schema.date()

声明regexp

Schema.regexp()

声明object

  1. Record<string,string>
Schema.dict(
    Schema.string()
)
  1. Record<string,number>
Schema.dict(
    Schema.number()
)
  1. Record<string,Date>
Schema.dict(
    Schema.date()
)
  1. Record<string,number[]>
Schema.dict(
    Schema.list(
        Schema.number()
    )
)
  1. Record<string,{foo:string,bar:number[]}[]>
Schema.dict(
    Schema.list(
        Schema.object({
            foo:Schema.string(),
            bar:Schema.list(Schema.number())
        })
    )
)

声明array

  1. string[]
Schema.array(
    Schema.string()
)
  1. {foo:number,bar:string}[]
Schema.array(
    Schema.object({
        foo:Schema.number(),
        bar:Schema.string()
    })
)
0.0.10

8 months ago

0.0.11

8 months ago

0.0.12

8 months ago

0.0.13

8 months ago

0.0.14

8 months ago

0.0.9

8 months ago

0.0.8

8 months ago

0.0.7

8 months ago

0.0.6

8 months ago

0.0.5

1 year ago

0.0.5-1

1 year ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago