UNPKG
@sinkingsheep/jsondb
Version:
latest (1.0.7)
1.0.7
1.0.6
1.0.5
1.0.4
1.0.2
1.0.1
1.0.0
A lightweight JSON-based database for Node.js
github.com/sinkingsheep/JsonDB
sinkingsheep/JsonDB
@sinkingsheep/jsondb
/
dist
/
schemaValidation.d.ts
6 lines
(5 loc)
•
245 B
TypeScript
View Raw
1
2
3
4
5
6
export
interface
Schema
{ [
key
:
string
]:
'string'
|
'number'
|
'boolean'
|
'object'
|
'array'
; }
export
declare
function
defineSchema
(
schema
:
Schema
):
Schema
;
export
declare
function
validateDocument
(
schema
:
Schema
,
document
:
any
):
boolean
;