@dipscope/type-manager 7.0.0-beta.0 → 7.0.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/CHANGELOG.md +262 -262
- package/CONTRIBUTING.md +58 -58
- package/LICENSE.md +201 -201
- package/README.md +1901 -1901
- package/dist/es2015/alias.js +1 -1
- package/dist/es2015/any.js +2 -2
- package/dist/es2015/custom-context.js +57 -57
- package/dist/es2015/custom-key.js +7 -7
- package/dist/es2015/custom-option.js +1 -1
- package/dist/es2015/custom-value-resolver.js +1 -1
- package/dist/es2015/custom-value.js +1 -1
- package/dist/es2015/default-value-resolver.js +1 -1
- package/dist/es2015/default-value.js +1 -1
- package/dist/es2015/discriminant.js +1 -1
- package/dist/es2015/discriminator.js +1 -1
- package/dist/es2015/factories/index.js +1 -1
- package/dist/es2015/factories/type-factory.js +33 -33
- package/dist/es2015/factory.js +1 -1
- package/dist/es2015/functions/get-own-reflect-metadata.js +7 -7
- package/dist/es2015/functions/get-reflect-metadata.js +7 -7
- package/dist/es2015/functions/get-words.js +4 -4
- package/dist/es2015/functions/index.js +18 -18
- package/dist/es2015/functions/is-arrow-function.js +4 -4
- package/dist/es2015/functions/is-ctor-function.js +4 -4
- package/dist/es2015/functions/is-data-view.js +3 -3
- package/dist/es2015/functions/is-float-32-array.js +3 -3
- package/dist/es2015/functions/is-float-64-array.js +3 -3
- package/dist/es2015/functions/is-int-16-array.js +3 -3
- package/dist/es2015/functions/is-int-32-array.js +3 -3
- package/dist/es2015/functions/is-int-8-array.js +3 -3
- package/dist/es2015/functions/is-uint-16-array.js +3 -3
- package/dist/es2015/functions/is-uint-32-array.js +3 -3
- package/dist/es2015/functions/is-uint-8-array.js +3 -3
- package/dist/es2015/functions/is-uint-8-clamped-array.js +3 -3
- package/dist/es2015/functions/json-parse.js +3 -3
- package/dist/es2015/functions/json-stringify.js +66 -66
- package/dist/es2015/functions/name-of.js +7 -7
- package/dist/es2015/generic-argument.js +1 -1
- package/dist/es2015/generic-metadata-resolver.js +1 -1
- package/dist/es2015/generic-metadata.js +1 -1
- package/dist/es2015/generic-structure.js +1 -1
- package/dist/es2015/index.js +70 -70
- package/dist/es2015/inject-index.js +1 -1
- package/dist/es2015/inject-internals.js +1 -1
- package/dist/es2015/inject-metadata.js +62 -62
- package/dist/es2015/inject-options.js +1 -1
- package/dist/es2015/inject-sorter.js +1 -1
- package/dist/es2015/inject-sorters/asc-inject-sorter.js +13 -13
- package/dist/es2015/inject-sorters/desc-inject-sorter.js +13 -13
- package/dist/es2015/inject-sorters/index.js +2 -2
- package/dist/es2015/inject.js +23 -23
- package/dist/es2015/injector.js +1 -1
- package/dist/es2015/injectors/index.js +1 -1
- package/dist/es2015/injectors/singleton-injector.js +30 -30
- package/dist/es2015/log-level.js +7 -7
- package/dist/es2015/log.js +49 -49
- package/dist/es2015/metadata.js +80 -80
- package/dist/es2015/naming-convention.js +1 -1
- package/dist/es2015/naming-conventions/camel-case-naming-convention.js +16 -16
- package/dist/es2015/naming-conventions/flat-case-naming-convention.js +12 -12
- package/dist/es2015/naming-conventions/flat-upper-case-naming-convention.js +12 -12
- package/dist/es2015/naming-conventions/index.js +8 -8
- package/dist/es2015/naming-conventions/kebab-case-naming-convention.js +16 -16
- package/dist/es2015/naming-conventions/kebab-upper-case-naming-convention.js +16 -16
- package/dist/es2015/naming-conventions/pascal-case-naming-convention.js +17 -17
- package/dist/es2015/naming-conventions/snake-case-naming-convention.js +16 -16
- package/dist/es2015/naming-conventions/snake-upper-case-naming-convention.js +16 -16
- package/dist/es2015/property-internals.js +1 -1
- package/dist/es2015/property-metadata.js +268 -268
- package/dist/es2015/property-name.js +1 -1
- package/dist/es2015/property-options.js +1 -1
- package/dist/es2015/property-sorter.js +1 -1
- package/dist/es2015/property-sorters/asc-property-sorter.js +13 -13
- package/dist/es2015/property-sorters/desc-property-sorter.js +13 -13
- package/dist/es2015/property-sorters/index.js +2 -2
- package/dist/es2015/property.js +38 -38
- package/dist/es2015/reference-callback.js +1 -1
- package/dist/es2015/reference-handler.js +1 -1
- package/dist/es2015/reference-handlers/circular-reference-handler.js +35 -35
- package/dist/es2015/reference-handlers/index.js +3 -3
- package/dist/es2015/reference-handlers/json-path-reference-handler.js +68 -68
- package/dist/es2015/reference-handlers/plain-reference-handler.js +31 -31
- package/dist/es2015/reference-key.js +1 -1
- package/dist/es2015/reference-value-getter.js +1 -1
- package/dist/es2015/reference-value-setter.js +1 -1
- package/dist/es2015/reference-value.js +1 -1
- package/dist/es2015/serializer-context-options.js +1 -1
- package/dist/es2015/serializer-context.js +281 -281
- package/dist/es2015/serializer.js +1 -1
- package/dist/es2015/serializers/any-serializer.js +21 -21
- package/dist/es2015/serializers/array-buffer-serializer.js +40 -40
- package/dist/es2015/serializers/array-serializer.js +59 -59
- package/dist/es2015/serializers/boolean-serializer.js +54 -54
- package/dist/es2015/serializers/data-view-serializer.js +41 -41
- package/dist/es2015/serializers/date-serializer.js +33 -33
- package/dist/es2015/serializers/float-32-array-serializer.js +34 -34
- package/dist/es2015/serializers/float-64-array-serializer.js +34 -34
- package/dist/es2015/serializers/index.js +21 -21
- package/dist/es2015/serializers/int-16-array-serializer.js +34 -34
- package/dist/es2015/serializers/int-32-array-serializer.js +34 -34
- package/dist/es2015/serializers/int-8-array-serializer.js +34 -34
- package/dist/es2015/serializers/map-serializer.js +95 -95
- package/dist/es2015/serializers/number-serializer.js +48 -48
- package/dist/es2015/serializers/set-serializer.js +61 -61
- package/dist/es2015/serializers/string-serializer.js +54 -54
- package/dist/es2015/serializers/type-serializer.js +120 -120
- package/dist/es2015/serializers/uint-16-array-serializer.js +34 -34
- package/dist/es2015/serializers/uint-32-array-serializer.js +34 -34
- package/dist/es2015/serializers/uint-8-array-serializer.js +34 -34
- package/dist/es2015/serializers/uint-8-clamped-array-serializer.js +34 -34
- package/dist/es2015/serializers/unknown-serializer.js +21 -21
- package/dist/es2015/type-abstraction.js +1 -1
- package/dist/es2015/type-argument.js +1 -1
- package/dist/es2015/type-configuration.js +1 -1
- package/dist/es2015/type-context-entry.js +8 -8
- package/dist/es2015/type-context.js +30 -30
- package/dist/es2015/type-ctor.js +1 -1
- package/dist/es2015/type-fn.js +1 -1
- package/dist/es2015/type-internals.js +1 -1
- package/dist/es2015/type-like.js +1 -1
- package/dist/es2015/type-manager-options.js +1 -1
- package/dist/es2015/type-manager.js +319 -319
- package/dist/es2015/type-metadata-resolver.js +1 -1
- package/dist/es2015/type-metadata-symbol.js +1 -1
- package/dist/es2015/type-metadata.js +413 -413
- package/dist/es2015/type-name.js +1 -1
- package/dist/es2015/type-options-base.js +1 -1
- package/dist/es2015/type-options.js +1 -1
- package/dist/es2015/type-resolver.js +1 -1
- package/dist/es2015/type.js +7 -7
- package/dist/es2015/unknown.js +2 -2
- package/dist/es5/alias.js +1 -1
- package/dist/es5/any.js +6 -6
- package/dist/es5/custom-context.js +93 -93
- package/dist/es5/custom-key.js +9 -9
- package/dist/es5/custom-option.js +1 -1
- package/dist/es5/custom-value-resolver.js +1 -1
- package/dist/es5/custom-value.js +1 -1
- package/dist/es5/default-value-resolver.js +1 -1
- package/dist/es5/default-value.js +1 -1
- package/dist/es5/discriminant.js +1 -1
- package/dist/es5/discriminator.js +1 -1
- package/dist/es5/factories/index.js +1 -1
- package/dist/es5/factories/type-factory.js +59 -59
- package/dist/es5/factory.js +1 -1
- package/dist/es5/functions/get-own-reflect-metadata.js +7 -7
- package/dist/es5/functions/get-reflect-metadata.js +7 -7
- package/dist/es5/functions/get-words.js +4 -4
- package/dist/es5/functions/index.js +18 -18
- package/dist/es5/functions/is-arrow-function.js +4 -4
- package/dist/es5/functions/is-ctor-function.js +4 -4
- package/dist/es5/functions/is-data-view.js +3 -3
- package/dist/es5/functions/is-float-32-array.js +3 -3
- package/dist/es5/functions/is-float-64-array.js +3 -3
- package/dist/es5/functions/is-int-16-array.js +3 -3
- package/dist/es5/functions/is-int-32-array.js +3 -3
- package/dist/es5/functions/is-int-8-array.js +3 -3
- package/dist/es5/functions/is-uint-16-array.js +3 -3
- package/dist/es5/functions/is-uint-32-array.js +3 -3
- package/dist/es5/functions/is-uint-8-array.js +3 -3
- package/dist/es5/functions/is-uint-8-clamped-array.js +3 -3
- package/dist/es5/functions/json-parse.js +3 -3
- package/dist/es5/functions/json-stringify.js +66 -66
- package/dist/es5/functions/name-of.js +7 -7
- package/dist/es5/generic-argument.js +1 -1
- package/dist/es5/generic-metadata-resolver.js +1 -1
- package/dist/es5/generic-metadata.js +1 -1
- package/dist/es5/generic-structure.js +1 -1
- package/dist/es5/index.js +70 -70
- package/dist/es5/inject-index.js +1 -1
- package/dist/es5/inject-internals.js +1 -1
- package/dist/es5/inject-metadata.js +83 -83
- package/dist/es5/inject-options.js +1 -1
- package/dist/es5/inject-sorter.js +1 -1
- package/dist/es5/inject-sorters/asc-inject-sorter.js +17 -17
- package/dist/es5/inject-sorters/desc-inject-sorter.js +17 -17
- package/dist/es5/inject-sorters/index.js +2 -2
- package/dist/es5/inject.js +23 -23
- package/dist/es5/injector.js +1 -1
- package/dist/es5/injectors/index.js +1 -1
- package/dist/es5/injectors/singleton-injector.js +44 -44
- package/dist/es5/log-level.js +7 -7
- package/dist/es5/log.js +64 -64
- package/dist/es5/metadata.js +105 -105
- package/dist/es5/naming-convention.js +1 -1
- package/dist/es5/naming-conventions/camel-case-naming-convention.js +20 -20
- package/dist/es5/naming-conventions/flat-case-naming-convention.js +16 -16
- package/dist/es5/naming-conventions/flat-upper-case-naming-convention.js +16 -16
- package/dist/es5/naming-conventions/index.js +8 -8
- package/dist/es5/naming-conventions/kebab-case-naming-convention.js +20 -20
- package/dist/es5/naming-conventions/kebab-upper-case-naming-convention.js +20 -20
- package/dist/es5/naming-conventions/pascal-case-naming-convention.js +21 -21
- package/dist/es5/naming-conventions/snake-case-naming-convention.js +20 -20
- package/dist/es5/naming-conventions/snake-upper-case-naming-convention.js +20 -20
- package/dist/es5/property-internals.js +1 -1
- package/dist/es5/property-metadata.js +377 -377
- package/dist/es5/property-name.js +1 -1
- package/dist/es5/property-options.js +1 -1
- package/dist/es5/property-sorter.js +1 -1
- package/dist/es5/property-sorters/asc-property-sorter.js +17 -17
- package/dist/es5/property-sorters/desc-property-sorter.js +17 -17
- package/dist/es5/property-sorters/index.js +2 -2
- package/dist/es5/property.js +38 -38
- package/dist/es5/reference-callback.js +1 -1
- package/dist/es5/reference-handler.js +1 -1
- package/dist/es5/reference-handlers/circular-reference-handler.js +39 -39
- package/dist/es5/reference-handlers/index.js +3 -3
- package/dist/es5/reference-handlers/json-path-reference-handler.js +92 -92
- package/dist/es5/reference-handlers/plain-reference-handler.js +35 -35
- package/dist/es5/reference-key.js +1 -1
- package/dist/es5/reference-value-getter.js +1 -1
- package/dist/es5/reference-value-setter.js +1 -1
- package/dist/es5/reference-value.js +1 -1
- package/dist/es5/serializer-context-options.js +1 -1
- package/dist/es5/serializer-context.js +416 -416
- package/dist/es5/serializer.js +1 -1
- package/dist/es5/serializers/any-serializer.js +25 -25
- package/dist/es5/serializers/array-buffer-serializer.js +44 -44
- package/dist/es5/serializers/array-serializer.js +69 -69
- package/dist/es5/serializers/boolean-serializer.js +58 -58
- package/dist/es5/serializers/data-view-serializer.js +45 -45
- package/dist/es5/serializers/date-serializer.js +37 -37
- package/dist/es5/serializers/float-32-array-serializer.js +38 -38
- package/dist/es5/serializers/float-64-array-serializer.js +38 -38
- package/dist/es5/serializers/index.js +21 -21
- package/dist/es5/serializers/int-16-array-serializer.js +38 -38
- package/dist/es5/serializers/int-32-array-serializer.js +38 -38
- package/dist/es5/serializers/int-8-array-serializer.js +38 -38
- package/dist/es5/serializers/map-serializer.js +114 -114
- package/dist/es5/serializers/number-serializer.js +52 -52
- package/dist/es5/serializers/set-serializer.js +77 -77
- package/dist/es5/serializers/string-serializer.js +58 -58
- package/dist/es5/serializers/type-serializer.js +153 -153
- package/dist/es5/serializers/uint-16-array-serializer.js +38 -38
- package/dist/es5/serializers/uint-32-array-serializer.js +38 -38
- package/dist/es5/serializers/uint-8-array-serializer.js +38 -38
- package/dist/es5/serializers/uint-8-clamped-array-serializer.js +38 -38
- package/dist/es5/serializers/unknown-serializer.js +25 -25
- package/dist/es5/type-abstraction.js +1 -1
- package/dist/es5/type-argument.js +1 -1
- package/dist/es5/type-configuration.js +1 -1
- package/dist/es5/type-context-entry.js +10 -10
- package/dist/es5/type-context.js +32 -32
- package/dist/es5/type-ctor.js +1 -1
- package/dist/es5/type-fn.js +1 -1
- package/dist/es5/type-internals.js +1 -1
- package/dist/es5/type-like.js +1 -1
- package/dist/es5/type-manager-options.js +1 -1
- package/dist/es5/type-manager.js +412 -412
- package/dist/es5/type-metadata-resolver.js +1 -1
- package/dist/es5/type-metadata-symbol.js +1 -1
- package/dist/es5/type-metadata.js +563 -563
- package/dist/es5/type-name.js +1 -1
- package/dist/es5/type-options-base.js +1 -1
- package/dist/es5/type-options.js +1 -1
- package/dist/es5/type-resolver.js +1 -1
- package/dist/es5/type.js +7 -7
- package/dist/es5/unknown.js +6 -6
- package/dist/types/alias.d.ts +6 -6
- package/dist/types/any.d.ts +9 -9
- package/dist/types/custom-context.d.ts +88 -88
- package/dist/types/custom-key.d.ts +28 -28
- package/dist/types/custom-option.d.ts +10 -10
- package/dist/types/custom-value-resolver.d.ts +6 -6
- package/dist/types/custom-value.d.ts +6 -6
- package/dist/types/default-value-resolver.d.ts +7 -7
- package/dist/types/default-value.d.ts +7 -7
- package/dist/types/discriminant.d.ts +8 -8
- package/dist/types/discriminator.d.ts +6 -6
- package/dist/types/factories/index.d.ts +1 -1
- package/dist/types/factories/type-factory.d.ts +19 -19
- package/dist/types/factory.d.ts +18 -18
- package/dist/types/functions/get-own-reflect-metadata.d.ts +9 -9
- package/dist/types/functions/get-reflect-metadata.d.ts +10 -10
- package/dist/types/functions/get-words.d.ts +8 -8
- package/dist/types/functions/index.d.ts +18 -18
- package/dist/types/functions/is-arrow-function.d.ts +8 -8
- package/dist/types/functions/is-ctor-function.d.ts +8 -8
- package/dist/types/functions/is-data-view.d.ts +8 -8
- package/dist/types/functions/is-float-32-array.d.ts +8 -8
- package/dist/types/functions/is-float-64-array.d.ts +8 -8
- package/dist/types/functions/is-int-16-array.d.ts +8 -8
- package/dist/types/functions/is-int-32-array.d.ts +8 -8
- package/dist/types/functions/is-int-8-array.d.ts +8 -8
- package/dist/types/functions/is-uint-16-array.d.ts +8 -8
- package/dist/types/functions/is-uint-32-array.d.ts +8 -8
- package/dist/types/functions/is-uint-8-array.d.ts +8 -8
- package/dist/types/functions/is-uint-8-clamped-array.d.ts +8 -8
- package/dist/types/functions/json-parse.d.ts +9 -9
- package/dist/types/functions/json-stringify.d.ts +10 -10
- package/dist/types/functions/name-of.d.ts +8 -8
- package/dist/types/generic-argument.d.ts +7 -7
- package/dist/types/generic-metadata-resolver.d.ts +7 -7
- package/dist/types/generic-metadata.d.ts +7 -7
- package/dist/types/generic-structure.d.ts +7 -7
- package/dist/types/index.d.ts +70 -70
- package/dist/types/inject-index.d.ts +6 -6
- package/dist/types/inject-internals.d.ts +14 -14
- package/dist/types/inject-metadata.d.ts +117 -117
- package/dist/types/inject-options.d.ts +22 -22
- package/dist/types/inject-sorter.d.ts +19 -19
- package/dist/types/inject-sorters/asc-inject-sorter.d.ts +20 -20
- package/dist/types/inject-sorters/desc-inject-sorter.d.ts +20 -20
- package/dist/types/inject-sorters/index.d.ts +2 -2
- package/dist/types/inject.d.ts +10 -10
- package/dist/types/injector.d.ts +16 -16
- package/dist/types/injectors/index.d.ts +1 -1
- package/dist/types/injectors/singleton-injector.d.ts +31 -31
- package/dist/types/log-level.d.ts +11 -11
- package/dist/types/log.d.ts +95 -95
- package/dist/types/metadata.d.ts +99 -99
- package/dist/types/naming-convention.d.ts +15 -15
- package/dist/types/naming-conventions/camel-case-naming-convention.d.ts +26 -26
- package/dist/types/naming-conventions/flat-case-naming-convention.d.ts +25 -25
- package/dist/types/naming-conventions/flat-upper-case-naming-convention.d.ts +25 -25
- package/dist/types/naming-conventions/index.d.ts +8 -8
- package/dist/types/naming-conventions/kebab-case-naming-convention.d.ts +26 -26
- package/dist/types/naming-conventions/kebab-upper-case-naming-convention.d.ts +26 -26
- package/dist/types/naming-conventions/pascal-case-naming-convention.d.ts +26 -26
- package/dist/types/naming-conventions/snake-case-naming-convention.d.ts +26 -26
- package/dist/types/naming-conventions/snake-upper-case-naming-convention.d.ts +26 -26
- package/dist/types/property-internals.d.ts +35 -35
- package/dist/types/property-metadata.d.ts +359 -359
- package/dist/types/property-name.d.ts +6 -6
- package/dist/types/property-options.d.ts +116 -116
- package/dist/types/property-sorter.d.ts +19 -19
- package/dist/types/property-sorters/asc-property-sorter.d.ts +20 -20
- package/dist/types/property-sorters/desc-property-sorter.d.ts +20 -20
- package/dist/types/property-sorters/index.d.ts +2 -2
- package/dist/types/property.d.ts +13 -13
- package/dist/types/reference-callback.d.ts +7 -7
- package/dist/types/reference-handler.d.ts +31 -31
- package/dist/types/reference-handlers/circular-reference-handler.d.ts +32 -32
- package/dist/types/reference-handlers/index.d.ts +3 -3
- package/dist/types/reference-handlers/json-path-reference-handler.d.ts +55 -55
- package/dist/types/reference-handlers/plain-reference-handler.d.ts +33 -33
- package/dist/types/reference-key.d.ts +6 -6
- package/dist/types/reference-value-getter.d.ts +7 -7
- package/dist/types/reference-value-setter.d.ts +7 -7
- package/dist/types/reference-value.d.ts +6 -6
- package/dist/types/serializer-context-options.d.ts +50 -50
- package/dist/types/serializer-context.d.ts +418 -418
- package/dist/types/serializer.d.ts +27 -27
- package/dist/types/serializers/any-serializer.d.ts +28 -28
- package/dist/types/serializers/array-buffer-serializer.d.ts +28 -28
- package/dist/types/serializers/array-serializer.d.ts +28 -28
- package/dist/types/serializers/boolean-serializer.d.ts +37 -37
- package/dist/types/serializers/data-view-serializer.d.ts +28 -28
- package/dist/types/serializers/date-serializer.d.ts +28 -28
- package/dist/types/serializers/float-32-array-serializer.d.ts +28 -28
- package/dist/types/serializers/float-64-array-serializer.d.ts +28 -28
- package/dist/types/serializers/index.d.ts +21 -21
- package/dist/types/serializers/int-16-array-serializer.d.ts +28 -28
- package/dist/types/serializers/int-32-array-serializer.d.ts +28 -28
- package/dist/types/serializers/int-8-array-serializer.d.ts +28 -28
- package/dist/types/serializers/map-serializer.d.ts +28 -28
- package/dist/types/serializers/number-serializer.d.ts +37 -37
- package/dist/types/serializers/set-serializer.d.ts +28 -28
- package/dist/types/serializers/string-serializer.d.ts +37 -37
- package/dist/types/serializers/type-serializer.d.ts +28 -28
- package/dist/types/serializers/uint-16-array-serializer.d.ts +28 -28
- package/dist/types/serializers/uint-32-array-serializer.d.ts +28 -28
- package/dist/types/serializers/uint-8-array-serializer.d.ts +28 -28
- package/dist/types/serializers/uint-8-clamped-array-serializer.d.ts +28 -28
- package/dist/types/serializers/unknown-serializer.d.ts +28 -28
- package/dist/types/type-abstraction.d.ts +6 -6
- package/dist/types/type-argument.d.ts +9 -9
- package/dist/types/type-configuration.d.ts +16 -16
- package/dist/types/type-context-entry.d.ts +36 -36
- package/dist/types/type-context.d.ts +70 -70
- package/dist/types/type-ctor.d.ts +6 -6
- package/dist/types/type-fn.d.ts +8 -8
- package/dist/types/type-internals.d.ts +14 -14
- package/dist/types/type-like.d.ts +7 -7
- package/dist/types/type-manager-options.d.ts +33 -33
- package/dist/types/type-manager.d.ts +413 -413
- package/dist/types/type-metadata-resolver.d.ts +8 -8
- package/dist/types/type-metadata-symbol.d.ts +6 -6
- package/dist/types/type-metadata.d.ts +513 -513
- package/dist/types/type-name.d.ts +6 -6
- package/dist/types/type-options-base.d.ts +106 -106
- package/dist/types/type-options.d.ts +72 -72
- package/dist/types/type-resolver.d.ts +7 -7
- package/dist/types/type.d.ts +9 -9
- package/dist/types/unknown.d.ts +9 -9
- package/dist/umd/index.js.map +1 -1
- package/package.json +63 -63
package/dist/es2015/alias.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=alias.js.map
|
package/dist/es2015/any.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export class Any {
|
|
2
|
-
}
|
|
1
|
+
export class Any {
|
|
2
|
+
}
|
|
3
3
|
//# sourceMappingURL=any.js.map
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { isNil, isUndefined } from 'lodash';
|
|
2
|
-
export class CustomContext {
|
|
3
|
-
constructor(customOptions = new Array()) {
|
|
4
|
-
this.customValueMap = new Map();
|
|
5
|
-
this.customOptions = this.constructCustomOptions(customOptions);
|
|
6
|
-
this.configure(customOptions);
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
constructCustomOptions(customOptions) {
|
|
10
|
-
const customValueMap = new Map();
|
|
11
|
-
for (const [customKey, customValue] of customOptions) {
|
|
12
|
-
customValueMap.set(customKey, customValue);
|
|
13
|
-
}
|
|
14
|
-
customOptions.splice(0, customOptions.length);
|
|
15
|
-
for (const [customKey, customValue] of customValueMap.entries()) {
|
|
16
|
-
customOptions.push([customKey, customValue]);
|
|
17
|
-
}
|
|
18
|
-
return customOptions;
|
|
19
|
-
}
|
|
20
|
-
set(customKey, customValue) {
|
|
21
|
-
const customOptions = this.customOptions;
|
|
22
|
-
this.customValueMap.set(customKey, customValue);
|
|
23
|
-
for (let i = 0; i < customOptions.length; i++) {
|
|
24
|
-
if (customOptions[i][0] === customKey) {
|
|
25
|
-
customOptions[i][1] = customValue;
|
|
26
|
-
return this;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
customOptions.push([customKey, customValue]);
|
|
30
|
-
return this;
|
|
31
|
-
}
|
|
32
|
-
get(customKey) {
|
|
33
|
-
let customValue = this.customValueMap.get(customKey);
|
|
34
|
-
if (isUndefined(customValue) && !isNil(customKey.customValueResolver)) {
|
|
35
|
-
customValue = customKey.customValueResolver();
|
|
36
|
-
}
|
|
37
|
-
return customValue;
|
|
38
|
-
}
|
|
39
|
-
has(customKey) {
|
|
40
|
-
return this.customValueMap.has(customKey);
|
|
41
|
-
}
|
|
42
|
-
keys() {
|
|
43
|
-
return this.customValueMap.keys();
|
|
44
|
-
}
|
|
45
|
-
values() {
|
|
46
|
-
return this.customValueMap.values();
|
|
47
|
-
}
|
|
48
|
-
entries() {
|
|
49
|
-
return this.customValueMap.entries();
|
|
50
|
-
}
|
|
51
|
-
configure(customOptions) {
|
|
52
|
-
for (const [customKey, customValue] of customOptions) {
|
|
53
|
-
this.set(customKey, customValue);
|
|
54
|
-
}
|
|
55
|
-
return this;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
1
|
+
import { isNil, isUndefined } from 'lodash';
|
|
2
|
+
export class CustomContext {
|
|
3
|
+
constructor(customOptions = new Array()) {
|
|
4
|
+
this.customValueMap = new Map();
|
|
5
|
+
this.customOptions = this.constructCustomOptions(customOptions);
|
|
6
|
+
this.configure(customOptions);
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
constructCustomOptions(customOptions) {
|
|
10
|
+
const customValueMap = new Map();
|
|
11
|
+
for (const [customKey, customValue] of customOptions) {
|
|
12
|
+
customValueMap.set(customKey, customValue);
|
|
13
|
+
}
|
|
14
|
+
customOptions.splice(0, customOptions.length);
|
|
15
|
+
for (const [customKey, customValue] of customValueMap.entries()) {
|
|
16
|
+
customOptions.push([customKey, customValue]);
|
|
17
|
+
}
|
|
18
|
+
return customOptions;
|
|
19
|
+
}
|
|
20
|
+
set(customKey, customValue) {
|
|
21
|
+
const customOptions = this.customOptions;
|
|
22
|
+
this.customValueMap.set(customKey, customValue);
|
|
23
|
+
for (let i = 0; i < customOptions.length; i++) {
|
|
24
|
+
if (customOptions[i][0] === customKey) {
|
|
25
|
+
customOptions[i][1] = customValue;
|
|
26
|
+
return this;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
customOptions.push([customKey, customValue]);
|
|
30
|
+
return this;
|
|
31
|
+
}
|
|
32
|
+
get(customKey) {
|
|
33
|
+
let customValue = this.customValueMap.get(customKey);
|
|
34
|
+
if (isUndefined(customValue) && !isNil(customKey.customValueResolver)) {
|
|
35
|
+
customValue = customKey.customValueResolver();
|
|
36
|
+
}
|
|
37
|
+
return customValue;
|
|
38
|
+
}
|
|
39
|
+
has(customKey) {
|
|
40
|
+
return this.customValueMap.has(customKey);
|
|
41
|
+
}
|
|
42
|
+
keys() {
|
|
43
|
+
return this.customValueMap.keys();
|
|
44
|
+
}
|
|
45
|
+
values() {
|
|
46
|
+
return this.customValueMap.values();
|
|
47
|
+
}
|
|
48
|
+
entries() {
|
|
49
|
+
return this.customValueMap.entries();
|
|
50
|
+
}
|
|
51
|
+
configure(customOptions) {
|
|
52
|
+
for (const [customKey, customValue] of customOptions) {
|
|
53
|
+
this.set(customKey, customValue);
|
|
54
|
+
}
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
58
|
//# sourceMappingURL=custom-context.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export class CustomKey {
|
|
2
|
-
constructor(description, customValueResolver) {
|
|
3
|
-
this.description = description;
|
|
4
|
-
this.customValueResolver = customValueResolver;
|
|
5
|
-
return;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
1
|
+
export class CustomKey {
|
|
2
|
+
constructor(description, customValueResolver) {
|
|
3
|
+
this.description = description;
|
|
4
|
+
this.customValueResolver = customValueResolver;
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
8
|
//# sourceMappingURL=custom-key.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=custom-option.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=custom-value-resolver.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=custom-value.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=default-value-resolver.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=default-value.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=discriminant.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=discriminator.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './type-factory';
|
|
1
|
+
export * from './type-factory';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { isNil, isUndefined } from 'lodash';
|
|
2
|
-
import { isCtorFunction } from '../functions/is-ctor-function';
|
|
3
|
-
export class TypeFactory {
|
|
4
|
-
build(typeContext, injector) {
|
|
5
|
-
var _a;
|
|
6
|
-
const typeMetadata = typeContext.typeMetadata;
|
|
7
|
-
const typeCtor = isCtorFunction(typeMetadata.typeFn) ? typeMetadata.typeFn : undefined;
|
|
8
|
-
if (isNil(typeCtor)) {
|
|
9
|
-
throw new Error(`${typeMetadata.typeName}: cannot build instance of abstract type.`);
|
|
10
|
-
}
|
|
11
|
-
const injectedKeys = new Array();
|
|
12
|
-
const args = new Array(typeCtor.length).fill(undefined);
|
|
13
|
-
for (const injectMetadata of typeMetadata.sortedInjectMetadatas) {
|
|
14
|
-
const argKey = injectMetadata.key;
|
|
15
|
-
if (!isNil(argKey)) {
|
|
16
|
-
args[injectMetadata.injectIndex] = (_a = typeContext.get(argKey)) === null || _a === void 0 ? void 0 : _a.value;
|
|
17
|
-
injectedKeys.push(argKey);
|
|
18
|
-
continue;
|
|
19
|
-
}
|
|
20
|
-
args[injectMetadata.injectIndex] = injector.get(injectMetadata.typeMetadata);
|
|
21
|
-
}
|
|
22
|
-
const type = new typeCtor(...args);
|
|
23
|
-
for (const typeContextEntry of typeContext.values()) {
|
|
24
|
-
const propertyMetadata = typeContextEntry.propertyMetadata;
|
|
25
|
-
if (!isNil(propertyMetadata)
|
|
26
|
-
&& !isUndefined(typeContextEntry.value)
|
|
27
|
-
&& !injectedKeys.includes(propertyMetadata.propertyName)) {
|
|
28
|
-
type[propertyMetadata.propertyName] = typeContextEntry.value;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return type;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
import { isNil, isUndefined } from 'lodash';
|
|
2
|
+
import { isCtorFunction } from '../functions/is-ctor-function';
|
|
3
|
+
export class TypeFactory {
|
|
4
|
+
build(typeContext, injector) {
|
|
5
|
+
var _a;
|
|
6
|
+
const typeMetadata = typeContext.typeMetadata;
|
|
7
|
+
const typeCtor = isCtorFunction(typeMetadata.typeFn) ? typeMetadata.typeFn : undefined;
|
|
8
|
+
if (isNil(typeCtor)) {
|
|
9
|
+
throw new Error(`${typeMetadata.typeName}: cannot build instance of abstract type.`);
|
|
10
|
+
}
|
|
11
|
+
const injectedKeys = new Array();
|
|
12
|
+
const args = new Array(typeCtor.length).fill(undefined);
|
|
13
|
+
for (const injectMetadata of typeMetadata.sortedInjectMetadatas) {
|
|
14
|
+
const argKey = injectMetadata.key;
|
|
15
|
+
if (!isNil(argKey)) {
|
|
16
|
+
args[injectMetadata.injectIndex] = (_a = typeContext.get(argKey)) === null || _a === void 0 ? void 0 : _a.value;
|
|
17
|
+
injectedKeys.push(argKey);
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
args[injectMetadata.injectIndex] = injector.get(injectMetadata.typeMetadata);
|
|
21
|
+
}
|
|
22
|
+
const type = new typeCtor(...args);
|
|
23
|
+
for (const typeContextEntry of typeContext.values()) {
|
|
24
|
+
const propertyMetadata = typeContextEntry.propertyMetadata;
|
|
25
|
+
if (!isNil(propertyMetadata)
|
|
26
|
+
&& !isUndefined(typeContextEntry.value)
|
|
27
|
+
&& !injectedKeys.includes(propertyMetadata.propertyName)) {
|
|
28
|
+
type[propertyMetadata.propertyName] = typeContextEntry.value;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return type;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
34
|
//# sourceMappingURL=type-factory.js.map
|
package/dist/es2015/factory.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=factory.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { isFunction, isObject } from 'lodash';
|
|
2
|
-
export function getOwnReflectMetadata(metadataKey, target) {
|
|
3
|
-
if (isObject(Reflect) && isFunction(Reflect.getOwnMetadata)) {
|
|
4
|
-
return Reflect.getOwnMetadata(metadataKey, target);
|
|
5
|
-
}
|
|
6
|
-
return undefined;
|
|
7
|
-
}
|
|
1
|
+
import { isFunction, isObject } from 'lodash';
|
|
2
|
+
export function getOwnReflectMetadata(metadataKey, target) {
|
|
3
|
+
if (isObject(Reflect) && isFunction(Reflect.getOwnMetadata)) {
|
|
4
|
+
return Reflect.getOwnMetadata(metadataKey, target);
|
|
5
|
+
}
|
|
6
|
+
return undefined;
|
|
7
|
+
}
|
|
8
8
|
//# sourceMappingURL=get-own-reflect-metadata.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { isFunction, isObject } from 'lodash';
|
|
2
|
-
export function getReflectMetadata(metadataKey, target, propertyKey) {
|
|
3
|
-
if (isObject(Reflect) && isFunction(Reflect.getMetadata)) {
|
|
4
|
-
return Reflect.getMetadata(metadataKey, target, propertyKey);
|
|
5
|
-
}
|
|
6
|
-
return undefined;
|
|
7
|
-
}
|
|
1
|
+
import { isFunction, isObject } from 'lodash';
|
|
2
|
+
export function getReflectMetadata(metadataKey, target, propertyKey) {
|
|
3
|
+
if (isObject(Reflect) && isFunction(Reflect.getMetadata)) {
|
|
4
|
+
return Reflect.getMetadata(metadataKey, target, propertyKey);
|
|
5
|
+
}
|
|
6
|
+
return undefined;
|
|
7
|
+
}
|
|
8
8
|
//# sourceMappingURL=get-reflect-metadata.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { words } from 'lodash';
|
|
2
|
-
export function getWords(x) {
|
|
3
|
-
return words(x);
|
|
4
|
-
}
|
|
1
|
+
import { words } from 'lodash';
|
|
2
|
+
export function getWords(x) {
|
|
3
|
+
return words(x);
|
|
4
|
+
}
|
|
5
5
|
//# sourceMappingURL=get-words.js.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export * from './get-own-reflect-metadata';
|
|
2
|
-
export * from './get-reflect-metadata';
|
|
3
|
-
export * from './get-words';
|
|
4
|
-
export * from './is-arrow-function';
|
|
5
|
-
export * from './is-ctor-function';
|
|
6
|
-
export * from './is-data-view';
|
|
7
|
-
export * from './is-float-32-array';
|
|
8
|
-
export * from './is-float-64-array';
|
|
9
|
-
export * from './is-int-8-array';
|
|
10
|
-
export * from './is-int-16-array';
|
|
11
|
-
export * from './is-int-32-array';
|
|
12
|
-
export * from './is-uint-8-array';
|
|
13
|
-
export * from './is-uint-8-clamped-array';
|
|
14
|
-
export * from './is-uint-16-array';
|
|
15
|
-
export * from './is-uint-32-array';
|
|
16
|
-
export * from './json-parse';
|
|
17
|
-
export * from './json-stringify';
|
|
18
|
-
export * from './name-of';
|
|
1
|
+
export * from './get-own-reflect-metadata';
|
|
2
|
+
export * from './get-reflect-metadata';
|
|
3
|
+
export * from './get-words';
|
|
4
|
+
export * from './is-arrow-function';
|
|
5
|
+
export * from './is-ctor-function';
|
|
6
|
+
export * from './is-data-view';
|
|
7
|
+
export * from './is-float-32-array';
|
|
8
|
+
export * from './is-float-64-array';
|
|
9
|
+
export * from './is-int-8-array';
|
|
10
|
+
export * from './is-int-16-array';
|
|
11
|
+
export * from './is-int-32-array';
|
|
12
|
+
export * from './is-uint-8-array';
|
|
13
|
+
export * from './is-uint-8-clamped-array';
|
|
14
|
+
export * from './is-uint-16-array';
|
|
15
|
+
export * from './is-uint-32-array';
|
|
16
|
+
export * from './json-parse';
|
|
17
|
+
export * from './json-stringify';
|
|
18
|
+
export * from './name-of';
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isFunction } from 'lodash';
|
|
2
|
-
export function isArrowFunction(x) {
|
|
3
|
-
return isFunction(x) && x.prototype && x.prototype.constructor === x && x.name === '';
|
|
4
|
-
}
|
|
1
|
+
import { isFunction } from 'lodash';
|
|
2
|
+
export function isArrowFunction(x) {
|
|
3
|
+
return isFunction(x) && x.prototype && x.prototype.constructor === x && x.name === '';
|
|
4
|
+
}
|
|
5
5
|
//# sourceMappingURL=is-arrow-function.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isFunction } from 'lodash';
|
|
2
|
-
export function isCtorFunction(x) {
|
|
3
|
-
return isFunction(x) && x.prototype && x.prototype.constructor === x && x.name !== '';
|
|
4
|
-
}
|
|
1
|
+
import { isFunction } from 'lodash';
|
|
2
|
+
export function isCtorFunction(x) {
|
|
3
|
+
return isFunction(x) && x.prototype && x.prototype.constructor === x && x.name !== '';
|
|
4
|
+
}
|
|
5
5
|
//# sourceMappingURL=is-ctor-function.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function isDataView(x) {
|
|
2
|
-
return x instanceof DataView;
|
|
3
|
-
}
|
|
1
|
+
export function isDataView(x) {
|
|
2
|
+
return x instanceof DataView;
|
|
3
|
+
}
|
|
4
4
|
//# sourceMappingURL=is-data-view.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function isFloat32Array(x) {
|
|
2
|
-
return x instanceof Float32Array;
|
|
3
|
-
}
|
|
1
|
+
export function isFloat32Array(x) {
|
|
2
|
+
return x instanceof Float32Array;
|
|
3
|
+
}
|
|
4
4
|
//# sourceMappingURL=is-float-32-array.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function isFloat64Array(x) {
|
|
2
|
-
return x instanceof Float64Array;
|
|
3
|
-
}
|
|
1
|
+
export function isFloat64Array(x) {
|
|
2
|
+
return x instanceof Float64Array;
|
|
3
|
+
}
|
|
4
4
|
//# sourceMappingURL=is-float-64-array.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function isInt16Array(x) {
|
|
2
|
-
return x instanceof Int16Array;
|
|
3
|
-
}
|
|
1
|
+
export function isInt16Array(x) {
|
|
2
|
+
return x instanceof Int16Array;
|
|
3
|
+
}
|
|
4
4
|
//# sourceMappingURL=is-int-16-array.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function isInt32Array(x) {
|
|
2
|
-
return x instanceof Int32Array;
|
|
3
|
-
}
|
|
1
|
+
export function isInt32Array(x) {
|
|
2
|
+
return x instanceof Int32Array;
|
|
3
|
+
}
|
|
4
4
|
//# sourceMappingURL=is-int-32-array.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function isInt8Array(x) {
|
|
2
|
-
return x instanceof Int8Array;
|
|
3
|
-
}
|
|
1
|
+
export function isInt8Array(x) {
|
|
2
|
+
return x instanceof Int8Array;
|
|
3
|
+
}
|
|
4
4
|
//# sourceMappingURL=is-int-8-array.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function isUint16Array(x) {
|
|
2
|
-
return x instanceof Uint16Array;
|
|
3
|
-
}
|
|
1
|
+
export function isUint16Array(x) {
|
|
2
|
+
return x instanceof Uint16Array;
|
|
3
|
+
}
|
|
4
4
|
//# sourceMappingURL=is-uint-16-array.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function isUint32Array(x) {
|
|
2
|
-
return x instanceof Uint32Array;
|
|
3
|
-
}
|
|
1
|
+
export function isUint32Array(x) {
|
|
2
|
+
return x instanceof Uint32Array;
|
|
3
|
+
}
|
|
4
4
|
//# sourceMappingURL=is-uint-32-array.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function isUint8Array(x) {
|
|
2
|
-
return x instanceof Uint8Array;
|
|
3
|
-
}
|
|
1
|
+
export function isUint8Array(x) {
|
|
2
|
+
return x instanceof Uint8Array;
|
|
3
|
+
}
|
|
4
4
|
//# sourceMappingURL=is-uint-8-array.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function isUint8ClampedArray(x) {
|
|
2
|
-
return x instanceof Uint8ClampedArray;
|
|
3
|
-
}
|
|
1
|
+
export function isUint8ClampedArray(x) {
|
|
2
|
+
return x instanceof Uint8ClampedArray;
|
|
3
|
+
}
|
|
4
4
|
//# sourceMappingURL=is-uint-8-clamped-array.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function jsonParse(x, reviver) {
|
|
2
|
-
return JSON.parse(x, reviver);
|
|
3
|
-
}
|
|
1
|
+
export function jsonParse(x, reviver) {
|
|
2
|
+
return JSON.parse(x, reviver);
|
|
3
|
+
}
|
|
4
4
|
//# sourceMappingURL=json-parse.js.map
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
export function jsonStringify(x, replacer, space) {
|
|
2
|
-
const spacing = typeof space === 'number' ? new Array(isFinite(space) ? space + 1 : 0).join(' ') : (space !== null && space !== void 0 ? space : '');
|
|
3
|
-
const separator = spacing ? ': ' : ':';
|
|
4
|
-
const seen = new Array();
|
|
5
|
-
const stringify = (parent, key, node, level) => {
|
|
6
|
-
if (node && node.toJSON && typeof node.toJSON === 'function') {
|
|
7
|
-
node = node.toJSON();
|
|
8
|
-
}
|
|
9
|
-
if (replacer) {
|
|
10
|
-
node = replacer.call(parent, key, node);
|
|
11
|
-
}
|
|
12
|
-
if (node === undefined) {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
if (typeof node === 'number') {
|
|
16
|
-
return isFinite(node) ? '' + node : 'null';
|
|
17
|
-
}
|
|
18
|
-
if (typeof node !== 'object') {
|
|
19
|
-
return JSON.stringify(node);
|
|
20
|
-
}
|
|
21
|
-
let i = 0;
|
|
22
|
-
let indent = '';
|
|
23
|
-
let out = '';
|
|
24
|
-
if (spacing) {
|
|
25
|
-
indent += '\n';
|
|
26
|
-
for (i = 0; i < level + 1; i++) {
|
|
27
|
-
indent += spacing;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
if (Array.isArray(node)) {
|
|
31
|
-
out += '[';
|
|
32
|
-
for (i = 0; i < node.length; i++) {
|
|
33
|
-
if (i) {
|
|
34
|
-
out += ',';
|
|
35
|
-
}
|
|
36
|
-
const value = stringify(node, i, node[i], level + 1) || 'null';
|
|
37
|
-
out += indent + spacing + value;
|
|
38
|
-
}
|
|
39
|
-
out += indent;
|
|
40
|
-
out += ']';
|
|
41
|
-
return out;
|
|
42
|
-
}
|
|
43
|
-
if (node === null) {
|
|
44
|
-
return 'null';
|
|
45
|
-
}
|
|
46
|
-
if (seen.indexOf(node) !== -1) {
|
|
47
|
-
throw new TypeError('Converting circular structure to JSON.');
|
|
48
|
-
}
|
|
49
|
-
const seenIndex = seen.push(node) - 1;
|
|
50
|
-
const keys = Object.keys(node).sort();
|
|
51
|
-
for (i = 0; i < keys.length; i++) {
|
|
52
|
-
const key = keys[i];
|
|
53
|
-
const value = stringify(node, key, node[key], level + 1);
|
|
54
|
-
if (!value) {
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
if (out) {
|
|
58
|
-
out += ',';
|
|
59
|
-
}
|
|
60
|
-
out += indent + spacing + JSON.stringify(key) + separator + value;
|
|
61
|
-
}
|
|
62
|
-
seen.splice(seenIndex, 1);
|
|
63
|
-
return '{' + out + indent + '}';
|
|
64
|
-
};
|
|
65
|
-
return stringify({ '': x }, '', x, 0);
|
|
66
|
-
}
|
|
1
|
+
export function jsonStringify(x, replacer, space) {
|
|
2
|
+
const spacing = typeof space === 'number' ? new Array(isFinite(space) ? space + 1 : 0).join(' ') : (space !== null && space !== void 0 ? space : '');
|
|
3
|
+
const separator = spacing ? ': ' : ':';
|
|
4
|
+
const seen = new Array();
|
|
5
|
+
const stringify = (parent, key, node, level) => {
|
|
6
|
+
if (node && node.toJSON && typeof node.toJSON === 'function') {
|
|
7
|
+
node = node.toJSON();
|
|
8
|
+
}
|
|
9
|
+
if (replacer) {
|
|
10
|
+
node = replacer.call(parent, key, node);
|
|
11
|
+
}
|
|
12
|
+
if (node === undefined) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (typeof node === 'number') {
|
|
16
|
+
return isFinite(node) ? '' + node : 'null';
|
|
17
|
+
}
|
|
18
|
+
if (typeof node !== 'object') {
|
|
19
|
+
return JSON.stringify(node);
|
|
20
|
+
}
|
|
21
|
+
let i = 0;
|
|
22
|
+
let indent = '';
|
|
23
|
+
let out = '';
|
|
24
|
+
if (spacing) {
|
|
25
|
+
indent += '\n';
|
|
26
|
+
for (i = 0; i < level + 1; i++) {
|
|
27
|
+
indent += spacing;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (Array.isArray(node)) {
|
|
31
|
+
out += '[';
|
|
32
|
+
for (i = 0; i < node.length; i++) {
|
|
33
|
+
if (i) {
|
|
34
|
+
out += ',';
|
|
35
|
+
}
|
|
36
|
+
const value = stringify(node, i, node[i], level + 1) || 'null';
|
|
37
|
+
out += indent + spacing + value;
|
|
38
|
+
}
|
|
39
|
+
out += indent;
|
|
40
|
+
out += ']';
|
|
41
|
+
return out;
|
|
42
|
+
}
|
|
43
|
+
if (node === null) {
|
|
44
|
+
return 'null';
|
|
45
|
+
}
|
|
46
|
+
if (seen.indexOf(node) !== -1) {
|
|
47
|
+
throw new TypeError('Converting circular structure to JSON.');
|
|
48
|
+
}
|
|
49
|
+
const seenIndex = seen.push(node) - 1;
|
|
50
|
+
const keys = Object.keys(node).sort();
|
|
51
|
+
for (i = 0; i < keys.length; i++) {
|
|
52
|
+
const key = keys[i];
|
|
53
|
+
const value = stringify(node, key, node[key], level + 1);
|
|
54
|
+
if (!value) {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
if (out) {
|
|
58
|
+
out += ',';
|
|
59
|
+
}
|
|
60
|
+
out += indent + spacing + JSON.stringify(key) + separator + value;
|
|
61
|
+
}
|
|
62
|
+
seen.splice(seenIndex, 1);
|
|
63
|
+
return '{' + out + indent + '}';
|
|
64
|
+
};
|
|
65
|
+
return stringify({ '': x }, '', x, 0);
|
|
66
|
+
}
|
|
67
67
|
//# sourceMappingURL=json-stringify.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { isFunction } from 'lodash';
|
|
2
|
-
export function nameOf(x) {
|
|
3
|
-
if (isFunction(x)) {
|
|
4
|
-
return x.name;
|
|
5
|
-
}
|
|
6
|
-
return 'Unknown';
|
|
7
|
-
}
|
|
1
|
+
import { isFunction } from 'lodash';
|
|
2
|
+
export function nameOf(x) {
|
|
3
|
+
if (isFunction(x)) {
|
|
4
|
+
return x.name;
|
|
5
|
+
}
|
|
6
|
+
return 'Unknown';
|
|
7
|
+
}
|
|
8
8
|
//# sourceMappingURL=name-of.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=generic-argument.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=generic-metadata-resolver.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=generic-metadata.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=generic-structure.js.map
|