shinkansen-transmission 2.3.4 → 2.3.5

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.
Files changed (24) hide show
  1. package/index.d.mts +82 -102
  2. package/package.json +1 -1
  3. package/src/transmission/common/index.d.mts +7 -4
  4. package/src/transmission/common/index.mjs +58 -60
  5. package/src/transmission/from-document-to-hash/array/index.mjs +1 -1
  6. package/src/transmission/from-document-to-hash/boolean/index.mjs +11 -8
  7. package/src/transmission/from-document-to-hash/index.d.mts +4 -4
  8. package/src/transmission/from-document-to-hash/index.mjs +25 -53
  9. package/src/transmission/from-document-to-hash/null/index.mjs +11 -8
  10. package/src/transmission/from-document-to-hash/number/index.mjs +11 -8
  11. package/src/transmission/from-document-to-hash/string/index.mjs +17 -8
  12. package/src/transmission/from-hash-to-document/array/index.mjs +1 -1
  13. package/src/transmission/from-hash-to-document/index.mjs +34 -10
  14. package/src/transmission/from-hash-to-document/object/index.mjs +1 -1
  15. package/src/transmission/to-zashiki/params/index.mjs +0 -24
  16. package/src/transmission/to-zashiki/render/array/index.mjs +6 -18
  17. package/src/transmission/to-zashiki/render/boolean/index.mjs +6 -18
  18. package/src/transmission/to-zashiki/render/null/index.mjs +6 -18
  19. package/src/transmission/to-zashiki/render/number/index.mjs +6 -18
  20. package/src/transmission/to-zashiki/render/object/index.mjs +6 -18
  21. package/src/transmission/to-zashiki/render/string/index.mjs +6 -18
  22. package/src/transmission/to-zashiki/render-params/root-schema/index.mjs +0 -2
  23. package/src/transmission/to-zashiki/render-params/schema/index.mjs +0 -24
  24. package/src/transmission/to-zashiki/transform-schema.mjs +0 -14
package/index.d.mts CHANGED
@@ -73,17 +73,29 @@ declare global {
73
73
  pattern?: RegExp
74
74
  }
75
75
 
76
- export interface StringSchemaType extends SchemaType {}
76
+ export interface StringSchemaType extends SchemaType {
77
+ type?: 'string'
78
+ }
77
79
 
78
- export interface NumberSchemaType extends SchemaType {}
80
+ export interface NumberSchemaType extends SchemaType {
81
+ type?: 'number'
82
+ }
79
83
 
80
- export interface ArraySchemaType extends SchemaType {}
84
+ export interface ArraySchemaType extends SchemaType {
85
+ type?: 'array'
86
+ }
81
87
 
82
- export interface ObjectSchemaType extends SchemaType {}
88
+ export interface ObjectSchemaType extends SchemaType {
89
+ type?: 'object'
90
+ }
83
91
 
84
- export interface BooleanSchemaType extends SchemaType {}
92
+ export interface BooleanSchemaType extends SchemaType {
93
+ type?: 'boolean'
94
+ }
85
95
 
86
- export interface NullSchemaType extends SchemaType {}
96
+ export interface NullSchemaType extends SchemaType {
97
+ type?: 'null'
98
+ }
87
99
 
88
100
  /**
89
101
  * String keys with string or string array values
@@ -93,9 +105,16 @@ declare global {
93
105
  interface MetaType extends ObjectType {
94
106
  parentUri?: string
95
107
  uri?: string
108
+ schema?: SchemaType
109
+ rootSchema?: SchemaType
110
+ value?: string
111
+ defaultValue?: string
112
+ item?: number
113
+ name?: string
96
114
  selectedItems?: SelectedItemsType
97
115
  items?: ItemsType
98
- item?: number
116
+ isRequired?: boolean
117
+ component?: string
99
118
  }
100
119
 
101
120
  interface ElementsType extends ObjectType {
@@ -104,14 +123,26 @@ declare global {
104
123
  }
105
124
 
106
125
  export namespace Transmission {
107
- export interface StringMetaType extends MetaType {
126
+ interface TransmissionMetaType extends MetaType {}
127
+
128
+ interface TransmissionElementsType extends ElementsType {
129
+ field?: FieldType
130
+ enum?: EnumType
131
+ anyOf?: AnyOfType
132
+ oneOf?: OneOfType
133
+ fields?: Array<{
134
+ meta?: TransmissionMetaType
135
+ elements?: TransmissionElementsType
136
+ }>
137
+ }
138
+
139
+ export interface StringMetaType extends TransmissionMetaType {
108
140
  minLength?: number
109
141
  maxLength?: number
110
142
  pattern?: RegExp
111
- defaultValue?: string
112
143
  }
113
144
 
114
- export interface NumberMetaType extends MetaType {
145
+ export interface NumberMetaType extends TransmissionMetaType {
115
146
  min?: number
116
147
  max?: number
117
148
  step?: number
@@ -119,59 +150,34 @@ declare global {
119
150
  isExclusiveMax?: boolean
120
151
  }
121
152
 
122
- export interface ArrayMetaType extends MetaType {}
153
+ export interface ArrayMetaType extends TransmissionMetaType {
154
+ minItems?: number
155
+ maxItems?: number
156
+ hasUniqueItems?: boolean
157
+ minContains?: number
158
+ maxContains?: number
159
+ }
123
160
 
124
- export interface ObjectMetaType extends MetaType {}
161
+ export interface ObjectMetaType extends TransmissionMetaType {
162
+ minProperties?: number
163
+ maxProperties?: number
164
+ }
125
165
 
126
- export interface BooleanMetaType extends MetaType {}
166
+ export interface BooleanMetaType extends TransmissionMetaType {}
127
167
 
128
- export interface NullMetaType extends MetaType {}
168
+ export interface NullMetaType extends TransmissionMetaType {}
129
169
 
130
- export interface StringElementsType extends ElementsType {
131
- field?: FieldType
132
- enum?: EnumType
133
- anyOf?: AnyOfType
134
- oneOf?: OneOfType
135
- }
170
+ export interface StringElementsType extends TransmissionElementsType {}
136
171
 
137
- export interface NumberElementsType extends ElementsType {
138
- field?: FieldType
139
- enum?: EnumType
140
- anyOf?: AnyOfType
141
- oneOf?: OneOfType
142
- }
172
+ export interface NumberElementsType extends TransmissionElementsType {}
143
173
 
144
- export interface ArrayElementsType extends ElementsType {
145
- field?: FieldType
146
- fields?: Array<{
147
- meta?: MetaType
148
- elements?: ElementsType
149
- }>
150
- enum?: EnumType
151
- anyOf?: AnyOfType
152
- oneOf?: OneOfType
153
- }
174
+ export interface ArrayElementsType extends TransmissionElementsType {}
154
175
 
155
- export interface ObjectElementsType extends ElementsType {
156
- field?: FieldType
157
- enum?: EnumType
158
- anyOf?: AnyOfType
159
- oneOf?: OneOfType
160
- }
176
+ export interface ObjectElementsType extends TransmissionElementsType {}
161
177
 
162
- export interface BooleanElementsType extends ElementsType {
163
- field?: FieldType
164
- enum?: EnumType
165
- anyOf?: AnyOfType
166
- oneOf?: OneOfType
167
- }
178
+ export interface BooleanElementsType extends TransmissionElementsType {}
168
179
 
169
- export interface NullElementsType extends ElementsType {
170
- field?: FieldType
171
- enum?: EnumType
172
- anyOf?: AnyOfType
173
- oneOf?: OneOfType
174
- }
180
+ export interface NullElementsType extends TransmissionElementsType {}
175
181
 
176
182
  interface TransmissionType {
177
183
  meta?: StringMetaType
@@ -212,21 +218,20 @@ declare global {
212
218
  export namespace Zashiki {
213
219
  interface ZashikiMetaType extends MetaType {
214
220
  type?: string
215
- schema?: SchemaType
216
- value?: string
217
- component?: string
218
221
  }
219
222
 
220
223
  interface ZashikiElementsType extends ElementsType {
221
- title?: string
222
- description?: string
224
+ field?: FieldType
225
+ fields?: Array<{
226
+ meta?: ZashikiMetaType
227
+ elements?: ZashikiElementsType
228
+ }>
223
229
  }
224
230
 
225
231
  export interface StringMetaType extends ZashikiMetaType {
226
232
  minLength?: number
227
233
  maxLength?: number
228
234
  pattern?: RegExp
229
- defaultValue?: string
230
235
  }
231
236
 
232
237
  export interface NumberMetaType extends ZashikiMetaType {
@@ -237,59 +242,34 @@ declare global {
237
242
  isExclusiveMax?: boolean
238
243
  }
239
244
 
240
- export interface ArrayMetaType extends ZashikiMetaType {}
245
+ export interface ArrayMetaType extends ZashikiMetaType {
246
+ minItems?: number
247
+ maxItems?: number
248
+ hasUniqueItems?: boolean
249
+ minContains?: number
250
+ maxContains?: number
251
+ }
241
252
 
242
- export interface ObjectMetaType extends ZashikiMetaType {}
253
+ export interface ObjectMetaType extends ZashikiMetaType {
254
+ minProperties?: number
255
+ maxProperties?: number
256
+ }
243
257
 
244
258
  export interface BooleanMetaType extends ZashikiMetaType {}
245
259
 
246
260
  export interface NullMetaType extends ZashikiMetaType {}
247
261
 
248
- export interface StringElementsType extends ZashikiElementsType {
249
- field?: FieldType
250
- enum?: EnumType
251
- anyOf?: AnyOfType
252
- oneOf?: OneOfType
253
- }
262
+ export interface StringElementsType extends ZashikiElementsType {}
254
263
 
255
- export interface NumberElementsType extends ZashikiElementsType {
256
- field?: FieldType
257
- enum?: EnumType
258
- anyOf?: AnyOfType
259
- oneOf?: OneOfType
260
- }
264
+ export interface NumberElementsType extends ZashikiElementsType {}
261
265
 
262
- export interface ArrayElementsType extends ZashikiElementsType {
263
- field?: FieldType
264
- fields?: Array<{
265
- meta?: ZashikiMetaType
266
- elements?: ZashikiElementsType
267
- }>
268
- enum?: EnumType
269
- anyOf?: AnyOfType
270
- oneOf?: OneOfType
271
- }
266
+ export interface ArrayElementsType extends ZashikiElementsType {}
272
267
 
273
- export interface ObjectElementsType extends ZashikiElementsType {
274
- field?: FieldType
275
- enum?: EnumType
276
- anyOf?: AnyOfType
277
- oneOf?: OneOfType
278
- }
268
+ export interface ObjectElementsType extends ZashikiElementsType {}
279
269
 
280
- export interface BooleanElementsType extends ZashikiElementsType {
281
- field?: FieldType
282
- enum?: EnumType
283
- anyOf?: AnyOfType
284
- oneOf?: OneOfType
285
- }
270
+ export interface BooleanElementsType extends ZashikiElementsType {}
286
271
 
287
- export interface NullElementsType extends ZashikiElementsType {
288
- field?: FieldType
289
- enum?: EnumType
290
- anyOf?: AnyOfType
291
- oneOf?: OneOfType
292
- }
272
+ export interface NullElementsType extends ZashikiElementsType {}
293
273
 
294
274
  interface ZashikiType {
295
275
  meta?: ZashikiMetaType
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shinkansen-transmission",
3
- "version": "2.3.4",
3
+ "version": "2.3.5",
4
4
  "description": "Shinkansen Transmission",
5
5
  "keywords": [
6
6
  "Shinkansen",
@@ -63,10 +63,10 @@ export function getMetaValue (values?: ValuesType, uri?: string, schema?: Schema
63
63
 
64
64
  export function transformToValue (schema?: string | number | object | boolean | null): string | number | object | boolean | null | undefined
65
65
 
66
- export function findByKey (parentUri: string, uri: string): (key: string | number) => boolean
67
- export function findByIndex (parentUri: string, uri: string): (item: SchemaType, index: number) => boolean
68
- export function findByValue (value?: string | number | object | boolean | null): (item?: string | number | object | boolean | null | string[] | number[] | object[] | boolean[] | null[]) => boolean
69
- export function findByEqual (value?: string | number | object | boolean | null): (item?: string | number | object | boolean | null | string[] | number[] | object[] | boolean[] | null[]) => boolean
66
+ export function getFindByKey (parentUri: string, uri: string): (key: string | number) => boolean
67
+ export function getFindByIndex (parentUri: string, uri: string): (item: SchemaType, index: number) => boolean
68
+ export function getFindByValue (value?: string | number | object | boolean | null): (item?: string | number | object | boolean | null | string[] | number[] | object[] | boolean[] | null[]) => boolean
69
+ export function getFindByEqual (value?: string | number | object | boolean | null): (item?: string | number | object | boolean | null | string[] | number[] | object[] | boolean[] | null[]) => boolean
70
70
 
71
71
  export function toString (value?: string | number | object | boolean | null): string
72
72
 
@@ -97,6 +97,9 @@ export { getSchema }
97
97
  export function transformValueIndexFor (array: string[] | number[] | object[] | boolean[] | null[], value?: string | number | object | boolean | null): string
98
98
  export function transformEqualIndexFor (array: string[] | number[] | object[] | boolean[] | null[], value?: string | number | object | boolean | null): string
99
99
 
100
+ export function getIndexByValue (array: string[] | number[] | object[] | boolean[] | null[], value?: string | number | object | boolean | null): number
101
+ export function getIndexByEqual (array: string[] | number[] | object[] | boolean[] | null[], value?: string | number | object | boolean | null): number
102
+
100
103
  export function hasValue (values?: ValuesType, uri?: string, schema?: SchemaType): boolean
101
104
  export function getValue (values?: ValuesType, uri?: string, schema?: SchemaType): string
102
105
 
@@ -308,8 +308,12 @@ export function getMetaValue (values = {}, uri = '#', schema = {}) {
308
308
  * @returns {string | number | object | boolean | null | undefined}
309
309
  */
310
310
  export function transformToValue (item) {
311
+ if (item === undefined) return item
312
+
311
313
  if (isPrimitive(item)) return item
312
314
 
315
+ if (isArray(item)) return item // .map(transformToValue)
316
+
313
317
  if (isObject(item)) {
314
318
  if (hasConst(item)) {
315
319
  return getConst(item)
@@ -318,9 +322,9 @@ export function transformToValue (item) {
318
322
  return getDefault(item)
319
323
  }
320
324
  }
321
- }
322
325
 
323
- return item
326
+ return item
327
+ }
324
328
  }
325
329
 
326
330
  /**
@@ -328,15 +332,14 @@ export function transformToValue (item) {
328
332
  * @param {string} uri
329
333
  * @returns {(key: string | number) => boolean}
330
334
  */
331
- export function findByKey (parentUri, uri) {
335
+ export function getFindByKey (parentUri, uri) {
332
336
  /*
333
- * log('findByKey')
337
+ * log('getFindByKey')
334
338
  */
335
339
  return function find (key) {
336
340
  /*
337
341
  * log('find')
338
342
  */
339
-
340
343
  return (
341
344
  getUri(parentUri, key) === uri
342
345
  )
@@ -346,51 +349,16 @@ export function findByKey (parentUri, uri) {
346
349
  /**
347
350
  * @param {string} parentUri
348
351
  * @param {string} uri
349
- * @returns {(item: SchemaType, index: number) => boolean}
352
+ * @returns {(schema: SchemaType, index: number) => boolean}
350
353
  */
351
- export function findByIndex (parentUri, uri) {
354
+ export function getFindByIndex (parentUri, uri) {
352
355
  /*
353
- * log('findByIndex')
356
+ * log('getFindByIndex')
354
357
  */
355
- return function find (item, index) {
358
+ return function find (schema, index) {
356
359
  /*
357
360
  * log('find')
358
361
  */
359
-
360
- /**
361
- * It's a schema not a value
362
- */
363
-
364
- if (hasEnum(item)) {
365
- /**
366
- * Do the `parentUri` and `uri` match?
367
- */
368
-
369
- return (
370
- getUri(parentUri, index) === uri
371
- )
372
- } else {
373
- if (hasAnyOf(item)) {
374
- const array = getAnyOf(item)
375
-
376
- return (
377
- array.filter(isObject).some(findByIndex(parentUri, uri))
378
- )
379
- } else {
380
- if (hasOneOf(item)) {
381
- const array = getOneOf(item)
382
-
383
- return (
384
- array.filter(isObject).some(findByIndex(parentUri, uri))
385
- )
386
- }
387
- }
388
- }
389
-
390
- /**
391
- * It's any other kind of schema/sub-schema
392
- */
393
-
394
362
  return (
395
363
  getUri(parentUri, index) === uri
396
364
  )
@@ -401,15 +369,14 @@ export function findByIndex (parentUri, uri) {
401
369
  * @param {string | number | object | boolean | null} [value]
402
370
  * @returns {(item?: string | number | object | boolean | null | string[] | number[] | object[] | boolean[] | null[]) => boolean}
403
371
  */
404
- export function findByValue (value) {
372
+ export function getFindByValue (value) {
405
373
  /*
406
- * log('findByValue')
374
+ * log('getFindByValue')
407
375
  */
408
376
  return function find (item) {
409
377
  /*
410
378
  * log('find')
411
379
  */
412
-
413
380
  return (
414
381
  value === transformToValue(item)
415
382
  )
@@ -420,9 +387,9 @@ export function findByValue (value) {
420
387
  * @param {string | number | object | boolean | null} [value]
421
388
  * @returns {(item?: string | number | object | boolean | null | string[] | number[] | object[] | boolean[] | null[]) => boolean}
422
389
  */
423
- export function findByEqual (value) {
390
+ export function getFindByEqual (value) {
424
391
  /*
425
- * log('findByEqual')
392
+ * log('getFindByEqual')
426
393
  */
427
394
  return function find (item) {
428
395
  /*
@@ -455,15 +422,17 @@ export function getArray ({ items /* array or object */ } = {}, parentUri = '',
455
422
  */
456
423
 
457
424
  if (isArray(items)) {
458
- const find = findByIndex(parentUri, uri)
459
-
460
425
  return (
461
- items.find(find)
426
+ items.find(getFindByIndex(parentUri, uri))
462
427
  )
428
+ } else {
429
+ if (isObject(items)) {
430
+ return (
431
+ items
432
+ )
433
+ }
463
434
  }
464
435
 
465
- if (isObject(items)) return items
466
-
467
436
  return undefined
468
437
  }
469
438
 
@@ -479,8 +448,7 @@ export function getObject ({ properties /* object */ } = {}, parentUri = '', uri
479
448
  */
480
449
 
481
450
  if (isObject(properties)) {
482
- const find = findByKey(parentUri, uri)
483
- const key = Object.keys(properties).find(find)
451
+ const key = Object.keys(properties).find(getFindByKey(parentUri, uri))
484
452
 
485
453
  if (key) {
486
454
  return (
@@ -543,14 +511,14 @@ export function transformValueIndexFor (array, value) {
543
511
  * log('transformEqualIndexFor')
544
512
  */
545
513
 
546
- const find = findByValue(value)
514
+ const find = getFindByValue(value)
547
515
 
548
516
  if (array.some(find)) {
549
517
  const index = array.findIndex(find)
550
518
 
551
519
  /*
552
- * Transform a number to a string
553
- */
520
+ * Transform a number to a string
521
+ */
554
522
  return String(index)
555
523
  }
556
524
 
@@ -560,6 +528,21 @@ export function transformValueIndexFor (array, value) {
560
528
  return toString(value)
561
529
  }
562
530
 
531
+ /**
532
+ * @param {string[] | number[] | object[] | boolean[] | null[]} array
533
+ * @param {string | number | object | boolean | null} [value]
534
+ * @returns {number}
535
+ */
536
+ export function getIndexByValue (array, value) {
537
+ /*
538
+ * log('transformEqualIndexFor')
539
+ */
540
+
541
+ return (
542
+ array.findIndex(getFindByValue(value))
543
+ )
544
+ }
545
+
563
546
  /**
564
547
  * @param {string[] | number[] | object[] | boolean[] | null[]} array
565
548
  * @param {string | number | object | boolean | null} [value]
@@ -570,7 +553,7 @@ export function transformEqualIndexFor (array, value) {
570
553
  * log('transformEqualIndexFor')
571
554
  */
572
555
 
573
- const find = findByEqual(value)
556
+ const find = getFindByEqual(value)
574
557
 
575
558
  if (array.some(find)) {
576
559
  const index = array.findIndex(find)
@@ -587,6 +570,21 @@ export function transformEqualIndexFor (array, value) {
587
570
  return toString(value)
588
571
  }
589
572
 
573
+ /**
574
+ * @param {string[] | number[] | object[] | boolean[] | null[]} array
575
+ * @param {string | number | object | boolean | null} [value]
576
+ * @returns {string}
577
+ */
578
+ export function getIndexByEqual (array, value) {
579
+ /*
580
+ * log('transformEqualIndexFor')
581
+ */
582
+
583
+ return (
584
+ array.findIndex(getFindByEqual(value))
585
+ )
586
+ }
587
+
590
588
  /**
591
589
  * @param {ValuesType} [values]
592
590
  * @param {string} [uri]
@@ -21,7 +21,7 @@ const log = debug('shinkansen-transmission/from-document-to-hash/array')
21
21
  log('`shinkansen` is awake')
22
22
 
23
23
  /**
24
- * Document can be `undefined`
24
+ * Document can be `undefined`
25
25
  *
26
26
  * @param {DocumentType} [document]
27
27
  * @param {SchemaType} [schema]
@@ -15,7 +15,7 @@ import {
15
15
  hasOneOf,
16
16
  getOneOf,
17
17
  getUri,
18
- transformValueIndexFor
18
+ getIndexByValue
19
19
  } from '#transmission/transmission/common'
20
20
 
21
21
  const log = debug('shinkansen-transmission/from-document-to-hash/boolean')
@@ -23,7 +23,7 @@ const log = debug('shinkansen-transmission/from-document-to-hash/boolean')
23
23
  log('`shinkansen` is awake')
24
24
 
25
25
  /**
26
- * Document can be `undefined`
26
+ * Document can be `undefined`
27
27
  *
28
28
  * @param {DocumentType} [document]
29
29
  * @param {SchemaType} [schema]
@@ -36,23 +36,26 @@ export default function transformBooleanSchema (document, schema = {}, hash = {}
36
36
  log('transformBooleanSchema')
37
37
 
38
38
  if (hasEnum(schema)) {
39
- const items = getEnum(schema)
39
+ const array = getEnum(schema)
40
+ const index = getIndexByValue(array, document)
40
41
 
41
- hash[uri] = transformValueIndexFor(items, document)
42
+ hash[uri] = String(index)
42
43
 
43
44
  return hash
44
45
  } else {
45
46
  if (hasAnyOf(schema)) {
46
- const items = getAnyOf(schema)
47
+ const array = getAnyOf(schema)
48
+ const index = getIndexByValue(array, document)
47
49
 
48
- hash[uri] = transformValueIndexFor(items, document)
50
+ hash[uri] = String(index)
49
51
 
50
52
  return hash
51
53
  } else {
52
54
  if (hasOneOf(schema)) {
53
- const items = getOneOf(schema)
55
+ const array = getOneOf(schema)
56
+ const index = getIndexByValue(array, document)
54
57
 
55
- hash[uri] = transformValueIndexFor(items, document)
58
+ hash[uri] = String(index)
56
59
 
57
60
  return hash
58
61
  }
@@ -2,10 +2,10 @@ export type DocumentType = TransmissionTypes.DocumentType
2
2
  export type SchemaType = TransmissionTypes.SchemaType
3
3
  export type HashType = TransmissionTypes.HashType
4
4
 
5
- export function transformArrayFor (document: DocumentType[], schema: { type: string }, hash: HashType, parentUri: string): HashType
6
- export function transformObjectFor (document: Record<string, DocumentType>, schema: { type: string }, hash: HashType, parentUri: string): HashType
5
+ export function transformArrayFor (document: DocumentType[], schema: SchemaType, hash: HashType, parentUri: string): HashType
6
+ export function transformObjectFor (document: Record<string, DocumentType>, schema: SchemaType, hash: HashType, parentUri: string): HashType
7
7
 
8
- export function transformArray (document: DocumentType[], schema: { type: string }, hash: HashType, parentUri: string, uri: string): HashType
9
- export function transformObject (document: Record<string, DocumentType>, schema: { type: string }, hash: HashType, parentUri: string, uri: string): HashType
8
+ export function transformArray (document: DocumentType[], schema: SchemaType, hash: HashType, parentUri: string, uri: string): HashType
9
+ export function transformObject (document: Record<string, DocumentType>, schema: SchemaType, hash: HashType, parentUri: string, uri: string): HashType
10
10
 
11
11
  export default function transform (document?: DocumentType, schema?: SchemaType, hash?: HashType, parentUri?: string, uri?: string): HashType