@modulify/validator 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,317 +1,119 @@
1
- /******************************************************************************
2
- Copyright (c) Microsoft Corporation.
3
-
4
- Permission to use, copy, modify, and/or distribute this software for any
5
- purpose with or without fee is hereby granted.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
14
- ***************************************************************************** */
15
- /* global Reflect, Promise, SuppressedError, Symbol */
16
-
17
-
18
- function __awaiter(thisArg, _arguments, P, generator) {
19
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
20
- return new (P || (P = Promise))(function (resolve, reject) {
21
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
22
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
23
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
24
- step((generator = generator.apply(thisArg, _arguments || [])).next());
25
- });
26
- }
27
-
28
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
29
- var e = new Error(message);
30
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
31
- };
32
-
33
- class Collection {
34
- constructor(constraints) {
35
- this.name = '@modulify/validator/Collection';
36
- this.constraints = constraints;
37
- }
38
- reduce(reducer, initial) {
39
- return Object.keys(this.constraints).reduce((accumulator, key) => {
40
- return reducer(accumulator, this.constraints[key], key);
41
- }, initial);
42
- }
43
- toViolation(value, path, reason) {
1
+ import { Assert, HasLength, IsBoolean, IsDate, IsDefined, IsEmail, IsNull, IsNumber, IsString, IsSymbol, OneOf } from "./assertions.mjs";
2
+ import { Each, HasProperties } from "./runners.mjs";
3
+ const check = (assert, value, path = []) => {
4
+ if (assert(value)) {
5
+ for (const a of assert.also) {
6
+ const violation = check(a, value, path);
7
+ if (violation) {
44
8
  return {
45
- by: this.name,
46
- value,
47
- path,
48
- reason,
9
+ ...violation,
10
+ violates: assert.fqn
49
11
  };
50
- }
51
- }
52
-
53
- const arraify = (value) => Array.isArray(value)
54
- ? [...value]
55
- : [value];
56
- const flatten = (recursive) => {
57
- const flattened = [];
58
- recursive.forEach(element => {
59
- flattened.push(...(Array.isArray(element)
60
- ? flatten(element)
61
- : [element]));
62
- });
63
- return flattened;
12
+ }
13
+ }
14
+ return null;
15
+ }
16
+ return {
17
+ value,
18
+ path,
19
+ violates: assert.fqn,
20
+ ..."reason" in assert ? { reason: assert.reason } : {},
21
+ ..."meta" in assert ? { meta: assert.meta } : {}
22
+ };
64
23
  };
65
- const constructorOf = (value) => {
66
- return Object.getPrototypeOf(value).constructor;
24
+ const isBatch = (c) => {
25
+ return "run" in c;
67
26
  };
68
- const isRecord = (value) => {
69
- return constructorOf(value) === Object && Object.keys(Object.getPrototypeOf(value)).length === 0;
27
+ const _validate = async (value, constraints, path = []) => {
28
+ const validations = [];
29
+ for (const c of arraify(constraints)) {
30
+ if (isBatch(c)) {
31
+ validations.push(...c.run(_validate, value, path).map((v2) => v2 instanceof Promise ? v2 : Promise.resolve(v2)));
32
+ continue;
33
+ }
34
+ const v = "That" in c ? check(c, value, [...path]) : c(value, [...path]);
35
+ if (v instanceof Promise) {
36
+ if (c.bail) {
37
+ const awaited = await v;
38
+ if (awaited) {
39
+ validations.push(Promise.resolve([awaited]));
40
+ break;
41
+ }
42
+ } else {
43
+ validations.push(v.then((v2) => v2 ? [v2] : []));
44
+ }
45
+ } else if (v) {
46
+ validations.push(Promise.resolve([v]));
47
+ if (c.bail) {
48
+ break;
49
+ }
50
+ }
51
+ }
52
+ return settle(value, path, validations);
70
53
  };
71
-
72
- class Each {
73
- constructor(constraints) {
74
- this.name = '@modulify/validator/Each';
75
- this.constraints = arraify(constraints);
76
- }
77
- toViolation(value, path, reason) {
78
- return {
79
- by: this.name,
80
- value,
81
- path,
82
- reason,
83
- };
84
- }
85
- }
86
-
87
- class Exists {
88
- constructor() {
89
- this.name = '@modulify/validator/Exists';
90
- }
91
- toViolation(value, path) {
92
- return {
93
- by: this.name,
94
- value,
95
- path,
96
- reason: 'undefined',
97
- };
98
- }
99
- }
100
-
101
- class Length {
102
- constructor(options) {
103
- var _a, _b, _c;
104
- this.name = '@modulify/validator/Length';
105
- this.exact = (_a = options.exact) !== null && _a !== void 0 ? _a : null;
106
- this.max = (_b = options.max) !== null && _b !== void 0 ? _b : null;
107
- this.min = (_c = options.min) !== null && _c !== void 0 ? _c : null;
108
- }
109
- toViolation(value, path, reason) {
110
- return {
111
- by: this.name,
112
- value,
113
- path,
114
- reason,
115
- meta: {
116
- exact: this.exact,
117
- max: this.max,
118
- min: this.min,
119
- }[reason],
120
- };
121
- }
122
- }
123
-
124
- class OneOf {
125
- constructor(values, equalTo = (a, b) => a === b) {
126
- this.name = '@modulify/validator/OneOf';
127
- this.values = Array.isArray(values) ? values : Object.values(values);
128
- this.equalTo = equalTo;
129
- }
130
- toViolation(value, path) {
131
- return {
132
- by: this.name,
133
- value,
134
- path,
135
- meta: this.values,
136
- };
137
- }
138
- }
139
-
140
- class LengthValidator {
141
- constructor(constraint) {
142
- this.constraint = constraint;
143
- }
144
- validate(value, path = []) {
145
- const constraint = this.constraint;
146
- const { exact, max, min } = constraint;
147
- if (!(typeof value === 'string' || Array.isArray(value))) {
148
- return constraint.toViolation(value, path, 'unsupported');
149
- }
150
- if (exact !== null && exact !== value.length) {
151
- return constraint.toViolation(value, path, 'exact');
152
- }
153
- if (max !== null && value.length > max) {
154
- return constraint.toViolation(value, path, 'max');
155
- }
156
- if (min !== null && value.length < min) {
157
- return constraint.toViolation(value, path, 'min');
158
- }
159
- return null;
160
- }
54
+ const _sync = (value, constraints, path = []) => {
55
+ const violations = [];
56
+ for (const c of arraify(constraints)) {
57
+ if (isBatch(c)) {
58
+ violations.push(...c.run(_sync, value, path));
59
+ continue;
60
+ }
61
+ const v = "That" in c ? check(c, value, [...path]) : c(value, [...path]);
62
+ if (v instanceof Promise) {
63
+ throw new Error("Found asynchronous constraint validator " + String(c.fqn));
64
+ } else if (v) {
65
+ violations.push(v);
66
+ if (c.bail) {
67
+ break;
68
+ }
69
+ }
70
+ }
71
+ return flatten(violations);
72
+ };
73
+ const validate = Object.assign(_validate, {
74
+ sync: _sync
75
+ });
76
+ function arraify(value) {
77
+ return Array.isArray(value) ? [...value] : [value];
161
78
  }
162
-
163
- class OneOfValidator {
164
- constructor(constraint) {
165
- this.constraint = constraint;
166
- }
167
- validate(value, path = []) {
168
- const equalTo = this.constraint.equalTo;
169
- if (!this.constraint.values.some(allowed => equalTo(allowed, value))) {
170
- return this.constraint.toViolation(value, path);
171
- }
172
- return null;
173
- }
79
+ function flatten(recursive) {
80
+ const flattened = [];
81
+ recursive.forEach((element) => {
82
+ flattened.push(...Array.isArray(element) ? flatten(element) : [element]);
83
+ });
84
+ return flattened;
174
85
  }
175
-
176
- class ProviderChain {
177
- constructor(current = null, previous = null) {
178
- this._current = current;
179
- this._previous = previous;
180
- }
181
- get(constraint) {
182
- var _a, _b, _c, _d;
183
- switch (true) {
184
- case constraint instanceof Length:
185
- return new LengthValidator(constraint);
186
- case constraint instanceof OneOf:
187
- return new OneOfValidator(constraint);
188
- default:
189
- return (_d = (_b = (_a = this._current) === null || _a === void 0 ? void 0 : _a.get(constraint)) !== null && _b !== void 0 ? _b : (_c = this._previous) === null || _c === void 0 ? void 0 : _c.get(constraint)) !== null && _d !== void 0 ? _d : null;
190
- }
191
- }
192
- override(provider) {
193
- return new ProviderChain(provider, this);
194
- }
86
+ async function settle(value, path, validations) {
87
+ const violations = [];
88
+ const settled = await Promise.allSettled(validations);
89
+ settled.forEach((result) => {
90
+ if (result.status === "fulfilled") {
91
+ violations.push(...result.value);
92
+ } else {
93
+ violations.push({
94
+ value,
95
+ path,
96
+ violates: "@modulify/validator",
97
+ reason: "reject",
98
+ meta: result.reason
99
+ });
100
+ }
101
+ });
102
+ return violations;
195
103
  }
196
-
197
- const validateAsynchronously = (provider, value, constraints, path = []) => __awaiter(void 0, void 0, void 0, function* () {
198
- const validations = [];
199
- for (const c of arraify(constraints)) {
200
- if (c instanceof Collection) {
201
- if (isRecord(value)) {
202
- validations.push(...c.reduce((validations, constraints, key) => {
203
- return [...validations, validateAsynchronously(provider, value[key], constraints, [...path, key])];
204
- }, []));
205
- }
206
- else {
207
- validations.push(Promise.resolve([c.toViolation(value, path, 'unsupported')]));
208
- }
209
- continue;
210
- }
211
- if (c instanceof Each) {
212
- if (Array.isArray(value)) {
213
- value.forEach((value, index) => {
214
- validations.push(validateAsynchronously(provider, value, c.constraints, [...path, index]));
215
- });
216
- }
217
- else {
218
- validations.push(validateAsynchronously(provider, value, c.constraints, [...path]));
219
- }
220
- continue;
221
- }
222
- if (c instanceof Exists) {
223
- if (typeof value === 'undefined') {
224
- validations.push(Promise.resolve([c.toViolation(value, [...path])]));
225
- break;
226
- }
227
- continue;
228
- }
229
- const validator = provider.get(c);
230
- if (!validator) {
231
- throw new Error('No validator for constraint ' + c.name);
232
- }
233
- const v = validator.validate(value, [...path]);
234
- if (v) {
235
- if (v instanceof Promise) {
236
- validations.push(v.then(v => v ? [v] : []));
237
- }
238
- else {
239
- validations.push(Promise.resolve([v]));
240
- }
241
- }
242
- }
243
- const results = yield Promise.allSettled(validations);
244
- const violations = [];
245
- results.forEach(result => {
246
- if (result.status === 'fulfilled') {
247
- violations.push(...result.value);
248
- }
249
- });
250
- return violations;
251
- });
252
- const validateSynchronously = (provider, value, constraints, path = []) => {
253
- const violations = [];
254
- for (const c of arraify(constraints)) {
255
- if (c instanceof Collection) {
256
- if (isRecord(value)) {
257
- violations.push(c.reduce((violations, constraints, key) => {
258
- return [...violations, ...validateSynchronously(provider, value[key], constraints, [...path, key])];
259
- }, []));
260
- }
261
- else {
262
- violations.push(c.toViolation(value, path, 'unsupported'));
263
- }
264
- continue;
265
- }
266
- if (c instanceof Each) {
267
- if (Array.isArray(value)) {
268
- value.forEach((value, index) => {
269
- violations.push(...validateSynchronously(provider, value, c.constraints, [...path, index]));
270
- });
271
- }
272
- else {
273
- violations.push(...validateSynchronously(provider, value, c.constraints, [...path]));
274
- }
275
- continue;
276
- }
277
- if (c instanceof Exists) {
278
- if (typeof value === 'undefined') {
279
- violations.push(c.toViolation(value, [...path]));
280
- break;
281
- }
282
- continue;
283
- }
284
- const validator = provider.get(c);
285
- if (!validator) {
286
- throw new Error('No validator for constraint ' + c.name);
287
- }
288
- const v = validator.validate(value, [...path]);
289
- if (v) {
290
- if (v instanceof Promise) {
291
- throw new Error('Found asynchronous validator for constraint ' + c.name);
292
- }
293
- violations.push(v);
294
- }
295
- }
296
- return flatten(violations);
104
+ export {
105
+ Assert,
106
+ Each,
107
+ HasLength,
108
+ HasProperties,
109
+ IsBoolean,
110
+ IsDate,
111
+ IsDefined,
112
+ IsEmail,
113
+ IsNull,
114
+ IsNumber,
115
+ IsString,
116
+ IsSymbol,
117
+ OneOf,
118
+ validate
297
119
  };
298
- const validate = (provider, value, constraints, path = [], asynchronously = true) => {
299
- return asynchronously
300
- ? validateAsynchronously(provider, value, constraints, path)
301
- : validateSynchronously(provider, value, constraints, path);
302
- };
303
- class V {
304
- constructor(provider = null) {
305
- this._provider = provider !== null && provider !== void 0 ? provider : new ProviderChain();
306
- }
307
- override(provider) {
308
- return new V(this._provider.override(provider));
309
- }
310
- validate(value, constraints, asynchronously = true) {
311
- return validate(this._provider, value, constraints, [], asynchronously);
312
- }
313
- }
314
- const createValidator = (provider = null) => new V(provider);
315
-
316
- export { Collection, Each, Exists, Length, OneOf, ProviderChain, createValidator, validate };
317
- //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ function hasProperty(key) {
4
+ return (value) => {
5
+ return isObject(value) && !isNull(value) && Object.prototype.hasOwnProperty.call(value, key);
6
+ };
7
+ }
8
+ function isArray(value) {
9
+ return Array.isArray(value);
10
+ }
11
+ function isBoolean(value) {
12
+ return typeof value === "boolean";
13
+ }
14
+ function isDate(value) {
15
+ return value instanceof Date;
16
+ }
17
+ function isEmail(value) {
18
+ const pattern = /^(([^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*)|(".+"))@(([^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,})$/i;
19
+ return isString(value) && pattern.test(value);
20
+ }
21
+ function isExact(exact) {
22
+ return (value) => value === exact;
23
+ }
24
+ function isNull(value) {
25
+ return value === null;
26
+ }
27
+ function isNumber(value) {
28
+ return typeof value === "number" && !isNaN(value);
29
+ }
30
+ function isObject(value) {
31
+ return typeof value === "object";
32
+ }
33
+ function isRecord(value) {
34
+ return isObject(value) && !isNull(value) && constructorOf(value) === Object && Object.keys(prototypeOf(value)).length === 0;
35
+ }
36
+ function isString(value) {
37
+ return typeof value === "string";
38
+ }
39
+ function isSymbol(value) {
40
+ return typeof value === "symbol";
41
+ }
42
+ function isUndefined(value) {
43
+ return typeof value === "undefined";
44
+ }
45
+ function constructorOf(value) {
46
+ return prototypeOf(value).constructor;
47
+ }
48
+ function prototypeOf(value) {
49
+ return Object.getPrototypeOf(value);
50
+ }
51
+ function And(...predicates) {
52
+ return (value) => {
53
+ return predicates.every((predicate) => predicate(value));
54
+ };
55
+ }
56
+ function Or(...predicates) {
57
+ return (value) => {
58
+ return predicates.some((predicate) => predicate(value));
59
+ };
60
+ }
61
+ function Not(predicate) {
62
+ return (value) => {
63
+ return !predicate(value);
64
+ };
65
+ }
66
+ exports.And = And;
67
+ exports.Not = Not;
68
+ exports.Or = Or;
69
+ exports.hasProperty = hasProperty;
70
+ exports.isArray = isArray;
71
+ exports.isBoolean = isBoolean;
72
+ exports.isDate = isDate;
73
+ exports.isEmail = isEmail;
74
+ exports.isExact = isExact;
75
+ exports.isNull = isNull;
76
+ exports.isNumber = isNumber;
77
+ exports.isObject = isObject;
78
+ exports.isRecord = isRecord;
79
+ exports.isString = isString;
80
+ exports.isSymbol = isSymbol;
81
+ exports.isUndefined = isUndefined;
@@ -0,0 +1,34 @@
1
+ import { Intersect, Predicate } from '../types';
2
+ /** Checks if a value has a property */
3
+ export declare function hasProperty<K extends PropertyKey = PropertyKey>(key: K): (value: unknown) => value is { [k in K]: unknown; };
4
+ /** Checks if a value is an array */
5
+ export declare function isArray(value: unknown): value is unknown[];
6
+ /** Checks if a value is a boolean */
7
+ export declare function isBoolean(value: unknown): value is boolean;
8
+ /** Checks if value is Date */
9
+ export declare function isDate(value: unknown): value is Date;
10
+ /** Checks if a value is an email */
11
+ export declare function isEmail(value: unknown): value is string;
12
+ /** Creates a predicate that checks if a value is equal to specified */
13
+ export declare function isExact<T = unknown>(exact: T): (value: unknown) => value is T;
14
+ /** Checks if value is null */
15
+ export declare function isNull(value: unknown): value is null;
16
+ /** Checks if a value is a number */
17
+ export declare function isNumber(value: unknown): value is number;
18
+ /** Checks if a value is an object */
19
+ export declare function isObject(value: unknown): value is object;
20
+ /** Check if a value is a record like Record<PropertyKey, unknown> */
21
+ export declare function isRecord(value: unknown): value is Record<PropertyKey, unknown>;
22
+ /** Checks if a value is a string */
23
+ export declare function isString(value: unknown): value is string;
24
+ /** Checks if a value is a symbol */
25
+ export declare function isSymbol(value: unknown): value is symbol;
26
+ /** Checks if value is undefined */
27
+ export declare function isUndefined(value: unknown): value is undefined;
28
+ export declare function And<T extends unknown[]>(...predicates: [...{
29
+ [K in keyof T]: Predicate<T[K]>;
30
+ }]): Predicate<Intersect<T>>;
31
+ export declare function Or<T extends unknown[]>(...predicates: [...{
32
+ [K in keyof T]: Predicate<T[K]>;
33
+ }]): Predicate<T[number]>;
34
+ export declare function Not<T>(predicate: Predicate<T>): Predicate;
@@ -0,0 +1,81 @@
1
+ function hasProperty(key) {
2
+ return (value) => {
3
+ return isObject(value) && !isNull(value) && Object.prototype.hasOwnProperty.call(value, key);
4
+ };
5
+ }
6
+ function isArray(value) {
7
+ return Array.isArray(value);
8
+ }
9
+ function isBoolean(value) {
10
+ return typeof value === "boolean";
11
+ }
12
+ function isDate(value) {
13
+ return value instanceof Date;
14
+ }
15
+ function isEmail(value) {
16
+ const pattern = /^(([^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*)|(".+"))@(([^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,})$/i;
17
+ return isString(value) && pattern.test(value);
18
+ }
19
+ function isExact(exact) {
20
+ return (value) => value === exact;
21
+ }
22
+ function isNull(value) {
23
+ return value === null;
24
+ }
25
+ function isNumber(value) {
26
+ return typeof value === "number" && !isNaN(value);
27
+ }
28
+ function isObject(value) {
29
+ return typeof value === "object";
30
+ }
31
+ function isRecord(value) {
32
+ return isObject(value) && !isNull(value) && constructorOf(value) === Object && Object.keys(prototypeOf(value)).length === 0;
33
+ }
34
+ function isString(value) {
35
+ return typeof value === "string";
36
+ }
37
+ function isSymbol(value) {
38
+ return typeof value === "symbol";
39
+ }
40
+ function isUndefined(value) {
41
+ return typeof value === "undefined";
42
+ }
43
+ function constructorOf(value) {
44
+ return prototypeOf(value).constructor;
45
+ }
46
+ function prototypeOf(value) {
47
+ return Object.getPrototypeOf(value);
48
+ }
49
+ function And(...predicates) {
50
+ return (value) => {
51
+ return predicates.every((predicate) => predicate(value));
52
+ };
53
+ }
54
+ function Or(...predicates) {
55
+ return (value) => {
56
+ return predicates.some((predicate) => predicate(value));
57
+ };
58
+ }
59
+ function Not(predicate) {
60
+ return (value) => {
61
+ return !predicate(value);
62
+ };
63
+ }
64
+ export {
65
+ And,
66
+ Not,
67
+ Or,
68
+ hasProperty,
69
+ isArray,
70
+ isBoolean,
71
+ isDate,
72
+ isEmail,
73
+ isExact,
74
+ isNull,
75
+ isNumber,
76
+ isObject,
77
+ isRecord,
78
+ isString,
79
+ isSymbol,
80
+ isUndefined
81
+ };
@@ -0,0 +1,3 @@
1
+ import { Constraint, MaybeMany, ValidationRunner } from '../../types';
2
+ declare const _default: (constraints: MaybeMany<Constraint>) => ValidationRunner;
3
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { Constraint, MaybeMany, ValidationRunner } from '../../types';
2
+ export type Descriptor<T extends object> = {
3
+ [P in keyof T]: MaybeMany<Constraint>;
4
+ };
5
+ declare const _default: <T extends object>(descriptor: Descriptor<T>) => ValidationRunner;
6
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as Each } from './Each';
2
+ export { default as HasProperties } from './HasProperties';
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const predicates = require("./predicates.cjs");
4
+ const Each = (constraints) => {
5
+ return {
6
+ run(validate, value, path) {
7
+ return predicates.isArray(value) ? value.map((v, i) => validate(v, constraints, [...path, i])) : [validate(value, constraints, [...path])];
8
+ }
9
+ };
10
+ };
11
+ const HasProperties = (descriptor) => ({
12
+ run(validate, value, path) {
13
+ if (predicates.isRecord(value)) {
14
+ const fields = Object.keys(descriptor);
15
+ return fields.reduce((accumulator, key) => [
16
+ ...accumulator,
17
+ validate(value[key], descriptor[key], [...path, key])
18
+ ], []);
19
+ } else {
20
+ return [
21
+ [{
22
+ value,
23
+ path,
24
+ violates: "@modulify/validator/HasProperties",
25
+ reason: "unsupported"
26
+ }]
27
+ ];
28
+ }
29
+ }
30
+ });
31
+ exports.Each = Each;
32
+ exports.HasProperties = HasProperties;
@@ -0,0 +1,2 @@
1
+ export * from './runners/index'
2
+ export {}