-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.mjs
More file actions
60 lines (46 loc) · 866 Bytes
/
index.mjs
File metadata and controls
60 lines (46 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import schemaDsl from './index.js';
export const {
// 统一DSL API
dsl,
DslBuilder,
// 配置函数 (v1.0.4+)
config,
// String 扩展控制
installStringExtensions,
uninstallStringExtensions,
// 核心类
JSONSchemaCore,
Validator,
// 便捷方法(推荐)
validate,
validateAsync,
getDefaultValidator,
ErrorFormatter,
CacheManager,
// 错误类 (v2.1.0 新增)
ValidationError,
I18nError,
// 错误消息系统
ErrorCodes,
MessageTemplate,
Locale,
// 插件系统 (v2.2.0 新增)
PluginManager,
// 导出器
exporters,
MongoDBExporter,
MySQLExporter,
PostgreSQLExporter,
MarkdownExporter,
// 工具函数
TypeConverter,
SchemaHelper,
SchemaUtils,
// 验证器扩展
CustomKeywords,
// 常量
CONSTANTS,
// 版本信息
VERSION
} = schemaDsl;
export default dsl;