@tstdl/base 0.86.0-beta2 → 0.86.0-beta3
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/.eslintrc.json +1 -0
- package/__container/decorators.d.ts +2 -0
- package/__container/decorators.js +34 -0
- package/__container/index.d.ts +3 -0
- package/__container/index.js +20 -0
- package/__container/interfaces.d.ts +2 -0
- package/__container/interfaces.js +25 -0
- package/__container/token.d.ts +2 -0
- package/__container/token.js +26 -0
- package/_container/container.js +443 -0
- package/_container/decorators.js +110 -0
- package/_container/index.js +27 -0
- package/_container/interfaces.js +26 -0
- package/_container/provider.js +60 -0
- package/_container/resolve-chain.js +105 -0
- package/_container/resolve.error.js +36 -0
- package/_container/token.js +41 -0
- package/_container/type-info.js +16 -0
- package/_container/types.js +16 -0
- package/_container/utils.js +44 -0
- package/api/client/client.d.ts +2 -2
- package/api/client/client.js +127 -109
- package/api/client/index.js +18 -1
- package/api/default-error-handlers.js +44 -18
- package/api/index.js +20 -14
- package/api/response.js +123 -99
- package/api/server/api-controller.d.ts +2 -2
- package/api/server/api-controller.js +71 -42
- package/api/server/api-request-token.provider.js +40 -12
- package/api/server/error-handler.js +46 -25
- package/api/server/gateway.d.ts +5 -6
- package/api/server/gateway.js +226 -207
- package/api/server/index.js +22 -5
- package/api/server/middlewares/allowed-methods.middleware.js +40 -17
- package/api/server/middlewares/catch-error.middleware.js +33 -12
- package/api/server/middlewares/cors.middleware.js +69 -49
- package/api/server/middlewares/index.js +21 -4
- package/api/server/middlewares/response-time.middleware.js +31 -8
- package/api/server/module.js +42 -18
- package/api/server/tokens.d.ts +4 -1
- package/api/server/tokens.js +31 -2
- package/api/types.js +40 -14
- package/api/utils.js +36 -13
- package/application/application.d.ts +7 -8
- package/application/application.js +163 -155
- package/application/index.js +18 -1
- package/async-iterator-symbol.js +28 -5
- package/authentication/authentication.api.js +113 -89
- package/authentication/client/api.client.js +57 -28
- package/authentication/client/authentication.service.d.ts +4 -4
- package/authentication/client/authentication.service.js +249 -223
- package/authentication/client/http-client.middleware.d.ts +3 -5
- package/authentication/client/http-client.middleware.js +35 -21
- package/authentication/client/index.js +22 -5
- package/authentication/client/module.d.ts +2 -1
- package/authentication/client/module.js +46 -15
- package/authentication/client/tokens.d.ts +2 -2
- package/authentication/client/tokens.js +30 -5
- package/authentication/errors/index.js +18 -1
- package/authentication/errors/secret-requirements.error.js +29 -6
- package/authentication/index.js +19 -2
- package/authentication/models/authentication-credentials.model.js +66 -37
- package/authentication/models/authentication-session.model.js +80 -51
- package/authentication/models/index.js +23 -6
- package/authentication/models/init-secret-reset-data.model.js +44 -16
- package/authentication/models/secret-check-result.model.js +36 -9
- package/authentication/models/token-payload-base.model.js +59 -31
- package/authentication/models/token.model.js +16 -1
- package/authentication/server/authentication-api-request-token.provider.js +52 -24
- package/authentication/server/authentication-credentials.repository.js +24 -1
- package/authentication/server/authentication-secret-requirements.validator.d.ts +11 -2
- package/authentication/server/authentication-secret-requirements.validator.js +58 -23
- package/authentication/server/authentication-secret-reset.handler.js +24 -1
- package/authentication/server/authentication-session.repository.js +24 -1
- package/authentication/server/authentication-subject.resolver.js +24 -5
- package/authentication/server/authentication-token-payload.provider.js +29 -5
- package/authentication/server/authentication.api-controller.js +114 -88
- package/authentication/server/authentication.service.d.ts +10 -3
- package/authentication/server/authentication.service.js +308 -264
- package/authentication/server/helper.js +87 -66
- package/authentication/server/index.js +28 -11
- package/authentication/server/module.d.ts +2 -1
- package/authentication/server/module.js +48 -25
- package/authentication/server/mongo/index.js +19 -2
- package/authentication/server/mongo/mongo-authentication-credentials.repository.d.ts +3 -3
- package/authentication/server/mongo/mongo-authentication-credentials.repository.js +84 -52
- package/authentication/server/mongo/mongo-authentication-session.repository.d.ts +3 -3
- package/authentication/server/mongo/mongo-authentication-session.repository.js +81 -49
- package/browser/browser-context-controller.d.ts +4 -4
- package/browser/browser-context-controller.js +106 -72
- package/browser/browser-controller.d.ts +12 -5
- package/browser/browser-controller.js +115 -74
- package/browser/browser.service.d.ts +12 -6
- package/browser/browser.service.js +117 -83
- package/browser/document-controller.js +81 -48
- package/browser/element-controller.d.ts +24 -0
- package/browser/element-controller.js +217 -139
- package/browser/frame-controller.js +50 -27
- package/browser/index.js +27 -10
- package/browser/locator-controller.js +59 -36
- package/browser/module.js +47 -23
- package/browser/page-controller.js +108 -89
- package/browser/pdf-options.js +103 -73
- package/browser/types.js +16 -1
- package/browser/utils.d.ts +2 -0
- package/browser/utils.js +116 -77
- package/collections/awaitable/awaitable-list.js +122 -99
- package/collections/awaitable/awaitable-map.js +116 -93
- package/collections/awaitable/awaitable-set.js +86 -63
- package/collections/awaitable/index.js +20 -3
- package/collections/collection.js +16 -1
- package/collections/index.js +23 -6
- package/collections/keyed-set.js +77 -53
- package/collections/list.js +16 -1
- package/collections/observable/index.js +25 -8
- package/collections/observable/observable-array.js +118 -95
- package/collections/observable/observable-collection-base.js +83 -60
- package/collections/observable/observable-collection.js +16 -1
- package/collections/observable/observable-list-base.js +78 -55
- package/collections/observable/observable-list.js +16 -1
- package/collections/observable/observable-map.js +79 -56
- package/collections/observable/observable-set.js +98 -75
- package/collections/observable/observable-sorted-array-list.js +188 -165
- package/collections/sorted-array-list.js +179 -156
- package/collections/sorted-list.js +16 -1
- package/collections/sorted-map.js +93 -70
- package/cookie/cookie.js +71 -49
- package/cookie/index.js +18 -1
- package/core.d.ts +4 -2
- package/core.js +82 -46
- package/data-structures/array-dictionary.js +110 -89
- package/data-structures/array-list.d.ts +1 -1
- package/data-structures/array-list.js +128 -105
- package/data-structures/cache.js +64 -41
- package/data-structures/circular-buffer.js +219 -195
- package/data-structures/collection.js +109 -86
- package/data-structures/dictionary.js +75 -51
- package/data-structures/distinct-collection.d.ts +24 -0
- package/data-structures/distinct-collection.js +77 -0
- package/data-structures/index-out-of-bounds.error.js +31 -8
- package/data-structures/index.d.ts +2 -1
- package/data-structures/index.js +33 -15
- package/data-structures/iterable-weak-map.js +149 -129
- package/data-structures/linked-list.js +385 -367
- package/data-structures/list.js +109 -78
- package/data-structures/map-dictionary.js +78 -55
- package/data-structures/multi-key-map.d.ts +1 -1
- package/data-structures/multi-key-map.js +163 -138
- package/data-structures/multi-key-set.d.ts +19 -0
- package/data-structures/multi-key-set.js +81 -0
- package/data-structures/{set.d.ts → set-collection.d.ts} +3 -3
- package/data-structures/set-collection.js +79 -0
- package/data-structures/sorted-array-list.d.ts +1 -1
- package/data-structures/sorted-array-list.js +166 -142
- package/data-structures/weak-ref-map.js +146 -123
- package/database/entity-repository.js +26 -2
- package/database/entity.js +16 -1
- package/database/id.js +29 -8
- package/database/index.js +23 -6
- package/database/module.js +33 -9
- package/database/mongo/classes.d.ts +5 -5
- package/database/mongo/classes.js +43 -13
- package/database/mongo/index.js +27 -10
- package/database/mongo/model/document.js +93 -62
- package/database/mongo/model/index.js +18 -1
- package/database/mongo/module.js +79 -51
- package/database/mongo/mongo-base.repository.js +283 -259
- package/database/mongo/mongo-bulk.js +110 -87
- package/database/mongo/mongo-entity-repository.d.ts +5 -5
- package/database/mongo/mongo-entity-repository.js +296 -270
- package/database/mongo/operations.js +76 -48
- package/database/mongo/query-converter.js +96 -73
- package/database/mongo/simple-entity-repository.js +28 -5
- package/database/mongo/types.js +25 -2
- package/database/query.js +36 -7
- package/database/utils.js +25 -2
- package/decorators/index.d.ts +1 -0
- package/decorators/index.js +18 -0
- package/decorators/log.d.ts +2 -0
- package/decorators/log.js +56 -0
- package/disposable/async-disposer.d.ts +4 -4
- package/disposable/async-disposer.js +105 -93
- package/disposable/disposable.js +33 -7
- package/disposable/index.js +20 -3
- package/disposable/using.js +37 -15
- package/distributed-loop/controller.js +16 -1
- package/distributed-loop/distributed-loop.d.ts +3 -3
- package/distributed-loop/distributed-loop.js +105 -78
- package/distributed-loop/index.js +20 -3
- package/distributed-loop/provider.js +48 -20
- package/enumerable/async-enumerable.js +261 -238
- package/enumerable/enumerable-methods.js +16 -1
- package/enumerable/enumerable.js +200 -177
- package/enumerable/index.js +19 -2
- package/environment.js +57 -25
- package/error/api.error.js +33 -10
- package/error/assertion.error.js +29 -6
- package/error/bad-request.error.js +29 -6
- package/error/custom.error.js +47 -25
- package/error/details.error.js +31 -8
- package/error/forbidden.error.js +29 -6
- package/error/index.js +33 -16
- package/error/invalid-token.error.js +29 -6
- package/error/max-bytes-exceeded.error.js +32 -9
- package/error/method-not-allowed.error.js +29 -6
- package/error/multi.error.js +31 -8
- package/error/not-found.error.js +29 -6
- package/error/not-implemented.error.js +29 -6
- package/error/not-supported.error.js +34 -11
- package/error/timeout.error.js +29 -6
- package/error/unauthorized.error.js +29 -6
- package/error/unsupported-media-type.error.js +29 -6
- package/examples/api/authentication.js +49 -42
- package/examples/api/basic-overview.js +85 -81
- package/examples/api/custom-authentication.js +69 -61
- package/examples/api/streaming.js +95 -90
- package/examples/browser/basic.js +21 -20
- package/examples/http/client.js +16 -13
- package/examples/mail/basic.js +42 -36
- package/examples/mail/templates/hello-name.js +33 -10
- package/examples/pdf/basic.js +49 -44
- package/examples/pdf/templates/hello-name.js +58 -35
- package/examples/reflection/basic.js +84 -52
- package/examples/template/basic.js +33 -30
- package/examples/template/templates/hello-jsx.js +32 -8
- package/examples/template/templates/hello-name.js +41 -18
- package/function/index.d.ts +1 -0
- package/function/index.js +18 -0
- package/function/log.d.ts +6 -0
- package/function/log.js +37 -0
- package/global-this.js +36 -17
- package/http/client/adapters/undici-http-client.adapter.js +111 -90
- package/http/client/http-client-options.d.ts +0 -5
- package/http/client/http-client-options.js +33 -14
- package/http/client/http-client-request.js +171 -149
- package/http/client/http-client-response.js +56 -33
- package/http/client/http-client.adapter.js +24 -1
- package/http/client/http-client.d.ts +5 -8
- package/http/client/http-client.js +325 -301
- package/http/client/index.js +23 -6
- package/http/client/middleware.d.ts +6 -0
- package/http/client/middleware.js +16 -0
- package/http/client/module.d.ts +6 -1
- package/http/client/module.js +42 -14
- package/http/client/tokens.d.ts +2 -0
- package/http/client/tokens.js +25 -0
- package/http/cookie-parser.js +42 -19
- package/http/http-body.js +75 -52
- package/http/http-form.js +37 -14
- package/http/http-headers.js +109 -86
- package/http/http-query.js +37 -14
- package/http/http-url-parameters.js +31 -8
- package/http/http-value-map.js +133 -110
- package/http/http.error.js +82 -60
- package/http/index.js +28 -11
- package/http/server/http-server-request.js +47 -24
- package/http/server/http-server-response.js +45 -22
- package/http/server/http-server.js +25 -2
- package/http/server/index.js +20 -3
- package/http/server/node/index.js +19 -2
- package/http/server/node/module.js +28 -8
- package/http/server/node/node-http-server.d.ts +1 -4
- package/http/server/node/node-http-server.js +230 -208
- package/http/types.js +47 -21
- package/http/utils.js +108 -92
- package/image-service/image-service.js +91 -59
- package/image-service/imgproxy/imgproxy-image-service.d.ts +6 -8
- package/image-service/imgproxy/imgproxy-image-service.js +125 -86
- package/image-service/imgproxy/index.js +18 -1
- package/image-service/index.js +18 -1
- package/import.js +25 -2
- package/index.js +18 -1
- package/injector/decorators.d.ts +81 -0
- package/injector/decorators.js +126 -0
- package/{container/index.js → injector/index.d.ts} +3 -2
- package/injector/index.js +28 -0
- package/injector/inject.d.ts +85 -0
- package/injector/inject.js +106 -0
- package/injector/injector.d.ts +91 -0
- package/injector/injector.js +497 -0
- package/injector/interfaces.d.ts +16 -0
- package/injector/interfaces.js +26 -0
- package/injector/provider.d.ts +49 -0
- package/injector/provider.js +64 -0
- package/injector/resolve-chain.d.ts +31 -0
- package/injector/resolve-chain.js +113 -0
- package/injector/resolve.error.d.ts +5 -0
- package/injector/resolve.error.js +36 -0
- package/injector/symbols.d.ts +2 -0
- package/injector/symbols.js +26 -0
- package/injector/token.d.ts +25 -0
- package/injector/token.js +41 -0
- package/injector/type-info.d.ts +20 -0
- package/injector/type-info.js +16 -0
- package/injector/types.d.ts +49 -0
- package/injector/types.js +16 -0
- package/interfaces.js +16 -1
- package/json-path/index.js +18 -1
- package/json-path/json-path.js +138 -138
- package/key-value-store/index.js +19 -2
- package/key-value-store/key-value-store.provider.js +24 -1
- package/key-value-store/key-value.store.d.ts +3 -3
- package/key-value-store/key-value.store.js +29 -6
- package/key-value-store/mongo/index.js +23 -6
- package/key-value-store/mongo/module.js +35 -17
- package/key-value-store/mongo/mongo-key-value-store.provider.js +48 -20
- package/key-value-store/mongo/mongo-key-value.model.js +16 -1
- package/key-value-store/mongo/mongo-key-value.repository.d.ts +3 -3
- package/key-value-store/mongo/mongo-key-value.repository.js +52 -22
- package/key-value-store/mongo/mongo-key-value.store.js +89 -59
- package/key-value-store/mongo/tokens.d.ts +1 -1
- package/key-value-store/mongo/tokens.js +25 -2
- package/lock/index.js +19 -2
- package/lock/lock.d.ts +3 -2
- package/lock/lock.js +29 -5
- package/lock/mongo/index.js +22 -5
- package/lock/mongo/lock.js +135 -111
- package/lock/mongo/model.js +16 -1
- package/lock/mongo/module.js +37 -18
- package/lock/mongo/mongo-lock-repository.d.ts +3 -3
- package/lock/mongo/mongo-lock-repository.js +85 -56
- package/lock/mongo/provider.js +68 -38
- package/lock/provider.d.ts +3 -2
- package/lock/provider.js +25 -1
- package/lock/web/index.js +20 -3
- package/lock/web/module.js +31 -11
- package/lock/web/web-lock.js +105 -80
- package/lock/web/web-lock.provider.js +57 -27
- package/logger/console/index.js +18 -1
- package/logger/console/logger.js +80 -53
- package/logger/index.js +19 -2
- package/logger/level.js +31 -8
- package/logger/logger.d.ts +3 -2
- package/logger/logger.js +61 -37
- package/logger/noop/index.js +18 -1
- package/logger/noop/logger.js +42 -20
- package/mail/clients/nodemailer.mail-client.js +91 -62
- package/mail/index.js +22 -5
- package/mail/mail-log.repository.js +25 -2
- package/mail/mail.client.d.ts +3 -2
- package/mail/mail.client.js +63 -34
- package/mail/mail.service.js +106 -73
- package/mail/models/index.js +23 -6
- package/mail/models/mail-address.model.js +16 -1
- package/mail/models/mail-content.model.js +16 -1
- package/mail/models/mail-data.model.js +16 -1
- package/mail/models/mail-log.model.js +16 -1
- package/mail/models/mail-send-result.model.js +16 -1
- package/mail/models/mail-template.model.js +28 -5
- package/mail/module.js +41 -21
- package/mail/repositories/mongo-mail-log.repository.d.ts +3 -3
- package/mail/repositories/mongo-mail-log.repository.js +56 -24
- package/mail/tokens.d.ts +1 -1
- package/mail/tokens.js +25 -2
- package/memory/finalization.js +60 -36
- package/memory/index.js +19 -2
- package/memory/observable-finalization-registry.js +32 -9
- package/message-bus/broadcast-channel/broadcast-channel-message-bus-provider.js +53 -23
- package/message-bus/broadcast-channel/broadcast-channel-message-bus.d.ts +1 -1
- package/message-bus/broadcast-channel/broadcast-channel-message-bus.js +74 -46
- package/message-bus/broadcast-channel/index.js +20 -3
- package/message-bus/broadcast-channel/module.js +31 -11
- package/message-bus/index.js +20 -3
- package/message-bus/local/index.js +20 -3
- package/message-bus/local/local-message-bus-provider.js +65 -35
- package/message-bus/local/local-message-bus.d.ts +1 -1
- package/message-bus/local/local-message-bus.js +66 -38
- package/message-bus/local/module.js +31 -11
- package/message-bus/local/types.js +16 -1
- package/message-bus/message-bus-base.js +63 -41
- package/message-bus/message-bus-provider.js +24 -1
- package/message-bus/message-bus.d.ts +3 -3
- package/message-bus/message-bus.js +29 -5
- package/migration/index.d.ts +1 -1
- package/migration/index.js +20 -3
- package/migration/migration-state-repository.js +25 -2
- package/migration/migration-state.js +16 -1
- package/migration/migrator.js +108 -80
- package/migration/mongo/index.js +19 -2
- package/migration/mongo/migration-state-repository.d.ts +3 -3
- package/migration/mongo/migration-state-repository.js +53 -23
- package/migration/mongo/module.js +34 -15
- package/module/index.js +21 -4
- package/module/module-base.js +60 -37
- package/module/module-metric-reporter.js +77 -58
- package/module/module.js +34 -10
- package/module/modules/function.module.js +34 -11
- package/module/modules/index.js +19 -2
- package/module/modules/web-server.module.d.ts +5 -10
- package/module/modules/web-server.module.js +83 -67
- package/module/utils.js +43 -19
- package/notification/api.js +50 -21
- package/notification/models/index.js +19 -2
- package/notification/models/notification-channel-job.model.js +16 -1
- package/notification/models/notification.model.js +103 -74
- package/notification/module.js +28 -8
- package/notification/notification-channel.service.js +24 -1
- package/notification/notification.repository.js +24 -1
- package/notification/notification.service.js +58 -30
- package/object-storage/index.js +20 -3
- package/object-storage/object-storage-provider.js +24 -1
- package/object-storage/object-storage.d.ts +3 -3
- package/object-storage/object-storage.js +30 -6
- package/object-storage/object.js +30 -7
- package/object-storage/s3/index.js +20 -3
- package/object-storage/s3/s3.object-storage-provider.js +109 -82
- package/object-storage/s3/s3.object-storage.d.ts +2 -2
- package/object-storage/s3/s3.object-storage.js +157 -130
- package/object-storage/s3/s3.object.js +62 -39
- package/openid-connect/cached-oidc-configuration.service.js +65 -35
- package/openid-connect/index.d.ts +1 -1
- package/openid-connect/index.js +28 -11
- package/openid-connect/mongo-oidc-state.repository.d.ts +3 -3
- package/openid-connect/mongo-oidc-state.repository.js +65 -38
- package/openid-connect/oidc-configuration.service.js +66 -38
- package/openid-connect/oidc-state.model.js +16 -1
- package/openid-connect/oidc-state.repository.js +25 -2
- package/openid-connect/oidc.service-model.js +16 -1
- package/openid-connect/oidc.service.js +187 -157
- package/package.json +18 -18
- package/password/have-i-been-pwned.js +39 -21
- package/password/index.js +21 -4
- package/password/password-check-result.model.js +63 -34
- package/password/password-check.js +76 -46
- package/password/password-check.localization.js +111 -86
- package/pdf/index.js +18 -1
- package/pdf/pdf.service.d.ts +3 -3
- package/pdf/pdf.service.js +206 -171
- package/pool/index.js +18 -1
- package/pool/pool.js +133 -116
- package/process-shutdown.d.ts +2 -2
- package/process-shutdown.js +75 -54
- package/promise/cancelable-promise.js +41 -23
- package/promise/deferred-promise.js +92 -68
- package/promise/index.js +20 -3
- package/promise/lazy-promise.js +47 -24
- package/queue/enqueue-batch.js +41 -18
- package/queue/index.js +20 -3
- package/queue/mongo/index.js +21 -4
- package/queue/mongo/job.js +16 -1
- package/queue/mongo/mongo-job.repository.d.ts +3 -3
- package/queue/mongo/mongo-job.repository.js +70 -44
- package/queue/mongo/queue.js +265 -242
- package/queue/mongo/queue.provider.d.ts +3 -3
- package/queue/mongo/queue.provider.js +72 -44
- package/queue/provider.js +24 -1
- package/queue/queue.d.ts +3 -3
- package/queue/queue.js +41 -15
- package/random/index.js +19 -2
- package/random/number-generator/index.js +20 -3
- package/random/number-generator/mulberry32.js +51 -34
- package/random/number-generator/random-number-generator-function.js +24 -1
- package/random/number-generator/random-number-generator.js +31 -8
- package/random/number-generator/seeded-random-number-generator.js +28 -5
- package/random/number-generator/sfc32.js +64 -41
- package/random/number-generator/utils.js +25 -2
- package/random/series.js +43 -41
- package/reflection/decorator-data.js +80 -63
- package/reflection/decorators.js +69 -39
- package/reflection/index.js +22 -5
- package/reflection/reflection-data-map.js +55 -32
- package/reflection/registry.d.ts +0 -1
- package/reflection/registry.js +130 -111
- package/reflection/types.js +16 -1
- package/reflection/utils.js +124 -96
- package/require.js +26 -3
- package/rpc/endpoints/message-port.rpc-endpoint.js +48 -29
- package/rpc/index.js +21 -4
- package/rpc/model.js +30 -7
- package/rpc/rpc-endpoint.js +40 -17
- package/rpc/rpc-error.js +40 -17
- package/rpc/rpc.js +235 -223
- package/rxjs/cast.js +28 -4
- package/rxjs/index.d.ts +1 -0
- package/rxjs/index.js +30 -12
- package/rxjs/intersection-observer.js +48 -25
- package/rxjs/media-query.js +27 -8
- package/rxjs/mutation-observer.js +50 -28
- package/rxjs/noop.js +28 -4
- package/rxjs/performance-observer.js +60 -37
- package/rxjs/resize-observer.js +50 -28
- package/rxjs/retry-backoff.js +47 -23
- package/rxjs/slow-array.js +36 -22
- package/rxjs/start-with-provider.d.ts +2 -0
- package/rxjs/start-with-provider.js +29 -0
- package/rxjs/teardown.js +44 -21
- package/rxjs/timing.js +57 -26
- package/rxjs/touch.js +30 -11
- package/schema/array-constraints/index.js +19 -2
- package/schema/array-constraints/maximum-length.js +42 -19
- package/schema/array-constraints/minimum-length.js +42 -19
- package/schema/coercers/boolean.coercer.js +49 -25
- package/schema/coercers/date.coercer.js +38 -14
- package/schema/coercers/index.js +23 -6
- package/schema/coercers/number.coercer.js +36 -12
- package/schema/coercers/regexp.coercer.js +41 -18
- package/schema/coercers/string.coercer.js +36 -12
- package/schema/coercers/uint8-array.coercer.js +44 -20
- package/schema/constraints/enumeration.js +49 -27
- package/schema/constraints/generic.js +41 -21
- package/schema/constraints/index.js +29 -12
- package/schema/constraints/integer.js +44 -20
- package/schema/constraints/length.js +36 -14
- package/schema/constraints/literal.js +44 -22
- package/schema/constraints/maximum-date.js +46 -23
- package/schema/constraints/maximum-length.js +45 -22
- package/schema/constraints/maximum.js +44 -21
- package/schema/constraints/minimum-date.js +46 -23
- package/schema/constraints/minimum-length.js +45 -22
- package/schema/constraints/minimum.js +44 -21
- package/schema/constraints/pattern.js +46 -23
- package/schema/decorators/class.js +26 -4
- package/schema/decorators/coerce.js +26 -4
- package/schema/decorators/constraint.js +28 -6
- package/schema/decorators/index.js +23 -6
- package/schema/decorators/property.js +38 -16
- package/schema/decorators/types.js +16 -1
- package/schema/decorators/utils.js +73 -45
- package/schema/index.js +27 -10
- package/schema/schema.error.js +72 -59
- package/schema/schema.js +274 -256
- package/schema/schemas/any.js +30 -7
- package/schema/schemas/array.js +44 -21
- package/schema/schemas/assign.js +46 -23
- package/schema/schemas/boolean.js +30 -7
- package/schema/schemas/constraint.js +29 -6
- package/schema/schemas/date.js +43 -20
- package/schema/schemas/defaulted.js +31 -8
- package/schema/schemas/enumeration.js +38 -15
- package/schema/schemas/index.js +43 -26
- package/schema/schemas/instance.js +26 -4
- package/schema/schemas/literal.js +38 -15
- package/schema/schemas/nullable.js +30 -7
- package/schema/schemas/number.js +48 -25
- package/schema/schemas/object.js +34 -10
- package/schema/schemas/omit.js +37 -14
- package/schema/schemas/one-or-many.js +35 -13
- package/schema/schemas/optional.js +30 -6
- package/schema/schemas/partial.js +39 -16
- package/schema/schemas/pick.js +37 -14
- package/schema/schemas/readable-stream.js +30 -7
- package/schema/schemas/record.js +31 -9
- package/schema/schemas/regexp.js +30 -7
- package/schema/schemas/string.js +59 -36
- package/schema/schemas/transform.js +29 -6
- package/schema/schemas/uint8-array.js +50 -27
- package/schema/schemas/union.js +34 -11
- package/schema/schemas/unknown.js +30 -7
- package/schema/transformers/generic.js +39 -16
- package/schema/transformers/index.js +21 -4
- package/schema/transformers/lowercase.js +33 -10
- package/schema/transformers/trim.js +33 -10
- package/schema/transformers/uppercase.js +33 -10
- package/schema/types/index.js +22 -5
- package/schema/types/schema-array-constraint.js +24 -1
- package/schema/types/schema-value-coercer.js +24 -1
- package/schema/types/schema-value-constraint.js +24 -1
- package/schema/types/schema-value-transformer.js +24 -1
- package/schema/types/types.js +191 -161
- package/schema/utils/index.js +19 -2
- package/schema/utils/schema.js +142 -120
- package/schema/utils/value-type.js +74 -51
- package/search-index/elastic/config.d.ts +3 -3
- package/search-index/elastic/config.js +50 -19
- package/search-index/elastic/index.js +23 -6
- package/search-index/elastic/keyword-rewriter.js +40 -17
- package/search-index/elastic/model/elastic-query.js +16 -1
- package/search-index/elastic/model/index-mapping.js +26 -4
- package/search-index/elastic/model/index.js +20 -3
- package/search-index/elastic/model/sort.js +16 -1
- package/search-index/elastic/module.d.ts +1 -1
- package/search-index/elastic/module.js +72 -39
- package/search-index/elastic/query-builder/boolean-query-builder.js +69 -46
- package/search-index/elastic/query-builder/index.js +18 -1
- package/search-index/elastic/query-converter.js +192 -174
- package/search-index/elastic/search-index.d.ts +2 -2
- package/search-index/elastic/search-index.js +153 -132
- package/search-index/elastic/sort-converter.js +34 -12
- package/search-index/elastic/types.js +16 -1
- package/search-index/error.js +35 -12
- package/search-index/index.js +20 -3
- package/search-index/memory/index.js +18 -1
- package/search-index/memory/memory-search-index.js +152 -130
- package/search-index/search-index.js +53 -30
- package/search-index/search-result.js +16 -1
- package/serializer/handlers/binary.js +47 -19
- package/serializer/handlers/date.js +28 -4
- package/serializer/handlers/error.js +31 -7
- package/serializer/handlers/index.js +24 -7
- package/serializer/handlers/map.js +40 -16
- package/serializer/handlers/regex.js +31 -7
- package/serializer/handlers/register.js +59 -36
- package/serializer/handlers/set.js +37 -13
- package/serializer/index.js +30 -3
- package/serializer/serializable.js +68 -43
- package/serializer/serializer.js +264 -244
- package/serializer/types.js +34 -6
- package/signals/api.d.ts +1 -1
- package/signals/api.js +48 -17
- package/signals/computed-with-dependencies.js +31 -8
- package/signals/effect-with-dependencies.js +31 -8
- package/signals/implementation/api.js +33 -33
- package/signals/implementation/computed.js +104 -125
- package/signals/implementation/configure.js +41 -18
- package/signals/implementation/effect.js +66 -48
- package/signals/implementation/errors.js +29 -5
- package/signals/implementation/graph.js +136 -164
- package/signals/implementation/index.js +27 -10
- package/signals/implementation/signal.js +101 -91
- package/signals/implementation/to-observable.js +38 -21
- package/signals/implementation/to-signal.js +60 -44
- package/signals/implementation/untracked.js +31 -15
- package/signals/implementation/watch.js +73 -58
- package/signals/index.d.ts +2 -0
- package/signals/index.js +26 -7
- package/signals/lazylize.d.ts +2 -0
- package/signals/lazylize.js +28 -0
- package/signals/pipe.d.ts +1 -1
- package/signals/pipe.js +33 -7
- package/signals/switch-map.js +27 -4
- package/signals/to-signal-2.d.ts +14 -0
- package/signals/to-signal-2.js +67 -0
- package/signals/types.js +16 -1
- package/signals/untracked-operator.js +33 -11
- package/sse/index.js +19 -2
- package/sse/model.js +16 -1
- package/sse/server-sent-events-source.js +76 -54
- package/sse/server-sent-events.js +72 -48
- package/supports.js +32 -5
- package/templates/index.js +26 -9
- package/templates/module.d.ts +2 -2
- package/templates/module.js +47 -40
- package/templates/providers/file.template-provider.d.ts +3 -3
- package/templates/providers/file.template-provider.js +82 -39
- package/templates/providers/memory.template-provider.js +55 -27
- package/templates/renderers/handlebars.template-renderer.js +122 -84
- package/templates/renderers/jsx.template-renderer.js +56 -28
- package/templates/renderers/mjml.template-renderer.js +82 -42
- package/templates/renderers/string.template-renderer.js +52 -24
- package/templates/resolvers/file.template-resolver.d.ts +3 -3
- package/templates/resolvers/file.template-resolver.js +90 -45
- package/templates/resolvers/jsx.template-resolver.js +59 -29
- package/templates/resolvers/string.template-resolver.js +59 -29
- package/templates/template-renderer.provider.js +66 -36
- package/templates/template-resolver.provider.js +66 -36
- package/templates/template.model.js +69 -39
- package/templates/template.provider.js +24 -1
- package/templates/template.renderer.js +34 -11
- package/templates/template.resolver.js +24 -1
- package/templates/template.service.js +82 -49
- package/templates/tokens.d.ts +2 -2
- package/templates/tokens.js +27 -3
- package/templates/types/jsx.intrinsic-elements.js +16 -1
- package/text/dynamic-text.model.js +69 -41
- package/text/index.js +20 -3
- package/text/localizable-text.model.js +16 -1
- package/text/localization.service.js +229 -196
- package/theme/adapters/css-adapter.js +46 -23
- package/theme/adapters/tailwind-adapter.js +52 -29
- package/theme/index.js +18 -1
- package/theme/theme-service.d.ts +1 -1
- package/theme/theme-service.js +147 -107
- package/threading/index.js +19 -2
- package/threading/thread-pool.js +70 -48
- package/threading/thread-worker.js +26 -3
- package/tokens.d.ts +1 -1
- package/tokens.js +25 -2
- package/types/geo-json.js +16 -1
- package/types.js +16 -2
- package/utils/alphabet.js +35 -12
- package/utils/any-iterable-iterator.js +27 -4
- package/utils/array/array-backtracker.js +65 -42
- package/utils/array/array.js +79 -76
- package/utils/array/index.js +19 -2
- package/utils/async-iterable-helpers/all.js +46 -25
- package/utils/async-iterable-helpers/any.js +46 -25
- package/utils/async-iterable-helpers/assert.js +43 -22
- package/utils/async-iterable-helpers/batch.js +46 -26
- package/utils/async-iterable-helpers/buffer.js +64 -47
- package/utils/async-iterable-helpers/concat.js +27 -5
- package/utils/async-iterable-helpers/default-if-empty.js +32 -9
- package/utils/async-iterable-helpers/deferred.js +26 -3
- package/utils/async-iterable-helpers/difference.js +48 -24
- package/utils/async-iterable-helpers/distinct.js +44 -23
- package/utils/async-iterable-helpers/drain.js +26 -4
- package/utils/async-iterable-helpers/filter.js +44 -23
- package/utils/async-iterable-helpers/first-or-default.js +30 -8
- package/utils/async-iterable-helpers/first.js +30 -8
- package/utils/async-iterable-helpers/for-each.js +38 -18
- package/utils/async-iterable-helpers/group-single.js +26 -3
- package/utils/async-iterable-helpers/group-to-map.js +41 -20
- package/utils/async-iterable-helpers/group-to-single-map.js +44 -23
- package/utils/async-iterable-helpers/group.js +26 -3
- package/utils/async-iterable-helpers/includes.js +28 -7
- package/utils/async-iterable-helpers/index.js +65 -48
- package/utils/async-iterable-helpers/interrupt.js +43 -19
- package/utils/async-iterable-helpers/is-async-iterable.js +29 -5
- package/utils/async-iterable-helpers/last-or-default.js +36 -13
- package/utils/async-iterable-helpers/last.js +36 -13
- package/utils/async-iterable-helpers/map-many.js +40 -19
- package/utils/async-iterable-helpers/map.js +40 -19
- package/utils/async-iterable-helpers/materialize.js +42 -21
- package/utils/async-iterable-helpers/metadata.js +58 -38
- package/utils/async-iterable-helpers/multiplex.js +44 -23
- package/utils/async-iterable-helpers/observable-iterable.js +53 -31
- package/utils/async-iterable-helpers/pairwise.js +44 -26
- package/utils/async-iterable-helpers/parallel/feed.js +45 -24
- package/utils/async-iterable-helpers/parallel/filter.js +31 -8
- package/utils/async-iterable-helpers/parallel/for-each.js +44 -21
- package/utils/async-iterable-helpers/parallel/group.js +32 -9
- package/utils/async-iterable-helpers/parallel/index.js +24 -7
- package/utils/async-iterable-helpers/parallel/map.js +29 -6
- package/utils/async-iterable-helpers/parallel/tap.js +29 -6
- package/utils/async-iterable-helpers/parallel/types.js +16 -1
- package/utils/async-iterable-helpers/reduce.js +46 -31
- package/utils/async-iterable-helpers/retry.js +58 -43
- package/utils/async-iterable-helpers/single-or-default.js +40 -17
- package/utils/async-iterable-helpers/single.js +42 -19
- package/utils/async-iterable-helpers/skip.js +26 -3
- package/utils/async-iterable-helpers/sort.js +29 -6
- package/utils/async-iterable-helpers/take-until.js +49 -32
- package/utils/async-iterable-helpers/take-while.js +46 -29
- package/utils/async-iterable-helpers/take.js +33 -10
- package/utils/async-iterable-helpers/tap.js +40 -19
- package/utils/async-iterable-helpers/throttle.js +30 -9
- package/utils/async-iterable-helpers/to-array.js +33 -10
- package/utils/async-iterable-helpers/to-async-iterable-iterator.js +59 -40
- package/utils/async-iterable-helpers/to-async-iterator.js +54 -32
- package/utils/async-iterable-helpers/to-set.js +33 -10
- package/utils/async-iterable-helpers/to-sync-iterable.js +27 -6
- package/utils/async-iterable-helpers/types.js +16 -1
- package/utils/async-iterable-helpers/while.js +46 -25
- package/utils/async-iterator-iterable-iterator.js +62 -41
- package/utils/backoff.js +109 -109
- package/utils/base64.js +140 -153
- package/utils/benchmark.js +107 -114
- package/utils/binary-search.js +87 -70
- package/utils/binary.js +61 -50
- package/utils/cancellation-token.js +140 -120
- package/utils/clone.js +64 -43
- package/utils/comparison.js +98 -76
- package/utils/compression.js +118 -107
- package/utils/config-parser.js +48 -21
- package/utils/crc32.js +42 -20
- package/utils/cryptography.js +121 -163
- package/utils/date-time.js +138 -102
- package/utils/encoding.js +60 -62
- package/utils/enum.js +53 -27
- package/utils/equals.js +119 -103
- package/utils/event-loop.js +39 -19
- package/utils/factory-map.js +75 -53
- package/utils/feedable-async-iterable.js +70 -47
- package/utils/file-reader.js +41 -15
- package/utils/format-error.js +57 -36
- package/utils/format.js +53 -32
- package/utils/function/index.js +19 -2
- package/utils/function/memoize.js +53 -38
- package/utils/function/throttle.js +48 -26
- package/utils/helpers.js +102 -93
- package/utils/image.js +88 -62
- package/utils/index.js +65 -48
- package/utils/iterable-helpers/all.js +31 -8
- package/utils/iterable-helpers/any.js +31 -8
- package/utils/iterable-helpers/assert.js +30 -7
- package/utils/iterable-helpers/batch.js +34 -11
- package/utils/iterable-helpers/concat.js +27 -4
- package/utils/iterable-helpers/default-if-empty.js +32 -9
- package/utils/iterable-helpers/deferred.js +25 -2
- package/utils/iterable-helpers/difference.js +45 -21
- package/utils/iterable-helpers/distinct.js +32 -9
- package/utils/iterable-helpers/drain.js +26 -4
- package/utils/iterable-helpers/filter.js +30 -7
- package/utils/iterable-helpers/first-or-default.js +30 -8
- package/utils/iterable-helpers/first.js +30 -8
- package/utils/iterable-helpers/for-each.js +28 -5
- package/utils/iterable-helpers/group-single.js +26 -3
- package/utils/iterable-helpers/group-to-map.js +32 -9
- package/utils/iterable-helpers/group-to-single-map.js +33 -10
- package/utils/iterable-helpers/group.js +26 -3
- package/utils/iterable-helpers/includes.js +26 -3
- package/utils/iterable-helpers/index.js +56 -39
- package/utils/iterable-helpers/is-iterable.js +29 -5
- package/utils/iterable-helpers/last-or-default.js +36 -13
- package/utils/iterable-helpers/last.js +36 -13
- package/utils/iterable-helpers/map-many.js +29 -6
- package/utils/iterable-helpers/map.js +29 -6
- package/utils/iterable-helpers/materialize.js +25 -2
- package/utils/iterable-helpers/metadata.js +38 -16
- package/utils/iterable-helpers/pairwise.js +33 -11
- package/utils/iterable-helpers/range.js +27 -4
- package/utils/iterable-helpers/reduce.js +33 -11
- package/utils/iterable-helpers/single-or-default.js +37 -14
- package/utils/iterable-helpers/single.js +40 -17
- package/utils/iterable-helpers/skip.js +29 -6
- package/utils/iterable-helpers/sort.js +27 -4
- package/utils/iterable-helpers/take-until.js +31 -8
- package/utils/iterable-helpers/take-while.js +33 -10
- package/utils/iterable-helpers/take.js +33 -10
- package/utils/iterable-helpers/tap.js +29 -6
- package/utils/iterable-helpers/types.js +16 -1
- package/utils/iterable-helpers/while.js +31 -8
- package/utils/jwt.js +100 -77
- package/utils/map.js +62 -35
- package/utils/math.js +64 -102
- package/utils/merge.js +45 -26
- package/utils/middleware.js +60 -36
- package/utils/moving-metric.js +188 -155
- package/utils/noop.js +27 -4
- package/utils/object/decycle.js +78 -57
- package/utils/object/dereference.js +44 -46
- package/utils/object/forward-ref.js +73 -57
- package/utils/object/index.js +24 -7
- package/utils/object/lazy-property.js +96 -81
- package/utils/object/merge.js +70 -48
- package/utils/object/object.js +136 -106
- package/utils/object/property-name.js +72 -69
- package/utils/ordered-feedable-async-iterable.js +65 -42
- package/utils/patch-worker.js +90 -69
- package/utils/patterns.js +29 -7
- package/utils/periodic-reporter.js +82 -60
- package/utils/periodic-sampler.js +91 -67
- package/utils/provider-function-iterable.js +48 -26
- package/utils/proxy.js +42 -17
- package/utils/random.js +50 -40
- package/utils/reflection.js +41 -13
- package/utils/repl.js +33 -14
- package/utils/set.js +62 -36
- package/utils/singleton.js +41 -18
- package/utils/sort.js +77 -53
- package/utils/stream/finalize-stream.js +62 -43
- package/utils/stream/index.js +23 -6
- package/utils/stream/readable-stream-adapter.js +57 -35
- package/utils/stream/readable-stream-from-promise.js +28 -7
- package/utils/stream/size-limited-stream.js +35 -12
- package/utils/stream/stream-helper-types.js +16 -1
- package/utils/stream/stream-reader.js +52 -30
- package/utils/string/hypenate.js +25 -2
- package/utils/string/index.js +20 -3
- package/utils/string/title-case.js +26 -6
- package/utils/string/trim.js +32 -9
- package/utils/throw.js +30 -7
- package/utils/timer.js +91 -70
- package/utils/timing.js +80 -52
- package/utils/type-guards.js +1076 -253
- package/utils/type-of.js +43 -25
- package/utils/units.js +124 -53
- package/utils/url-builder.js +68 -47
- package/utils/value-or-provider.js +29 -6
- package/utils/z-base32.js +63 -42
- package/web-types.js +16 -1
- package/container/container.js +0 -428
- package/container/decorators.js +0 -126
- package/container/interfaces.js +0 -2
- package/container/provider.js +0 -29
- package/container/resolve-chain.js +0 -80
- package/container/resolve.error.js +0 -11
- package/container/token.js +0 -20
- package/container/type-info.js +0 -1
- package/container/types.js +0 -1
- package/container/utils.js +0 -20
- package/data-structures/set.js +0 -56
- /package/{container → _container}/container.d.ts +0 -0
- /package/{container → _container}/decorators.d.ts +0 -0
- /package/{container → _container}/index.d.ts +0 -0
- /package/{container → _container}/interfaces.d.ts +0 -0
- /package/{container → _container}/provider.d.ts +0 -0
- /package/{container → _container}/resolve-chain.d.ts +0 -0
- /package/{container → _container}/resolve.error.d.ts +0 -0
- /package/{container → _container}/token.d.ts +0 -0
- /package/{container → _container}/type-info.d.ts +0 -0
- /package/{container → _container}/types.d.ts +0 -0
- /package/{container → _container}/utils.d.ts +0 -0
package/utils/type-guards.js
CHANGED
|
@@ -1,253 +1,1076 @@
|
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var type_guards_exports = {};
|
|
20
|
+
__export(type_guards_exports, {
|
|
21
|
+
assert: () => assert,
|
|
22
|
+
assertArray: () => assertArray,
|
|
23
|
+
assertArrayBuffer: () => assertArrayBuffer,
|
|
24
|
+
assertArrayBufferPass: () => assertArrayBufferPass,
|
|
25
|
+
assertArrayBufferView: () => assertArrayBufferView,
|
|
26
|
+
assertArrayBufferViewPass: () => assertArrayBufferViewPass,
|
|
27
|
+
assertArrayPass: () => assertArrayPass,
|
|
28
|
+
assertBigInt: () => assertBigInt,
|
|
29
|
+
assertBigInt64Array: () => assertBigInt64Array,
|
|
30
|
+
assertBigInt64ArrayPass: () => assertBigInt64ArrayPass,
|
|
31
|
+
assertBigIntPass: () => assertBigIntPass,
|
|
32
|
+
assertBigUint64Array: () => assertBigUint64Array,
|
|
33
|
+
assertBigUint64ArrayPass: () => assertBigUint64ArrayPass,
|
|
34
|
+
assertBinaryData: () => assertBinaryData,
|
|
35
|
+
assertBinaryDataPass: () => assertBinaryDataPass,
|
|
36
|
+
assertBlob: () => assertBlob,
|
|
37
|
+
assertBlobPass: () => assertBlobPass,
|
|
38
|
+
assertBoolean: () => assertBoolean,
|
|
39
|
+
assertBooleanPass: () => assertBooleanPass,
|
|
40
|
+
assertDataView: () => assertDataView,
|
|
41
|
+
assertDataViewPass: () => assertDataViewPass,
|
|
42
|
+
assertDate: () => assertDate,
|
|
43
|
+
assertDatePass: () => assertDatePass,
|
|
44
|
+
assertDefined: () => assertDefined,
|
|
45
|
+
assertDefinedPass: () => assertDefinedPass,
|
|
46
|
+
assertError: () => assertError,
|
|
47
|
+
assertErrorPass: () => assertErrorPass,
|
|
48
|
+
assertFloat32Array: () => assertFloat32Array,
|
|
49
|
+
assertFloat32ArrayPass: () => assertFloat32ArrayPass,
|
|
50
|
+
assertFloat64Array: () => assertFloat64Array,
|
|
51
|
+
assertFloat64ArrayPass: () => assertFloat64ArrayPass,
|
|
52
|
+
assertFunction: () => assertFunction,
|
|
53
|
+
assertFunctionPass: () => assertFunctionPass,
|
|
54
|
+
assertInt16Array: () => assertInt16Array,
|
|
55
|
+
assertInt16ArrayPass: () => assertInt16ArrayPass,
|
|
56
|
+
assertInt32Array: () => assertInt32Array,
|
|
57
|
+
assertInt32ArrayPass: () => assertInt32ArrayPass,
|
|
58
|
+
assertInt8Array: () => assertInt8Array,
|
|
59
|
+
assertInt8ArrayPass: () => assertInt8ArrayPass,
|
|
60
|
+
assertJsonPrimitive: () => assertJsonPrimitive,
|
|
61
|
+
assertJsonPrimitivePass: () => assertJsonPrimitivePass,
|
|
62
|
+
assertMap: () => assertMap,
|
|
63
|
+
assertMapPass: () => assertMapPass,
|
|
64
|
+
assertNot: () => assertNot,
|
|
65
|
+
assertNotArray: () => assertNotArray,
|
|
66
|
+
assertNotArrayBuffer: () => assertNotArrayBuffer,
|
|
67
|
+
assertNotArrayBufferPass: () => assertNotArrayBufferPass,
|
|
68
|
+
assertNotArrayBufferView: () => assertNotArrayBufferView,
|
|
69
|
+
assertNotArrayBufferViewPass: () => assertNotArrayBufferViewPass,
|
|
70
|
+
assertNotArrayPass: () => assertNotArrayPass,
|
|
71
|
+
assertNotBigInt: () => assertNotBigInt,
|
|
72
|
+
assertNotBigInt64Array: () => assertNotBigInt64Array,
|
|
73
|
+
assertNotBigInt64ArrayPass: () => assertNotBigInt64ArrayPass,
|
|
74
|
+
assertNotBigIntPass: () => assertNotBigIntPass,
|
|
75
|
+
assertNotBigUint64Array: () => assertNotBigUint64Array,
|
|
76
|
+
assertNotBigUint64ArrayPass: () => assertNotBigUint64ArrayPass,
|
|
77
|
+
assertNotBinaryData: () => assertNotBinaryData,
|
|
78
|
+
assertNotBinaryDataPass: () => assertNotBinaryDataPass,
|
|
79
|
+
assertNotBlob: () => assertNotBlob,
|
|
80
|
+
assertNotBlobPass: () => assertNotBlobPass,
|
|
81
|
+
assertNotBoolean: () => assertNotBoolean,
|
|
82
|
+
assertNotBooleanPass: () => assertNotBooleanPass,
|
|
83
|
+
assertNotDataView: () => assertNotDataView,
|
|
84
|
+
assertNotDataViewPass: () => assertNotDataViewPass,
|
|
85
|
+
assertNotDate: () => assertNotDate,
|
|
86
|
+
assertNotDatePass: () => assertNotDatePass,
|
|
87
|
+
assertNotError: () => assertNotError,
|
|
88
|
+
assertNotErrorPass: () => assertNotErrorPass,
|
|
89
|
+
assertNotFloat32Array: () => assertNotFloat32Array,
|
|
90
|
+
assertNotFloat32ArrayPass: () => assertNotFloat32ArrayPass,
|
|
91
|
+
assertNotFloat64Array: () => assertNotFloat64Array,
|
|
92
|
+
assertNotFloat64ArrayPass: () => assertNotFloat64ArrayPass,
|
|
93
|
+
assertNotFunction: () => assertNotFunction,
|
|
94
|
+
assertNotFunctionPass: () => assertNotFunctionPass,
|
|
95
|
+
assertNotInt16Array: () => assertNotInt16Array,
|
|
96
|
+
assertNotInt16ArrayPass: () => assertNotInt16ArrayPass,
|
|
97
|
+
assertNotInt32Array: () => assertNotInt32Array,
|
|
98
|
+
assertNotInt32ArrayPass: () => assertNotInt32ArrayPass,
|
|
99
|
+
assertNotInt8Array: () => assertNotInt8Array,
|
|
100
|
+
assertNotInt8ArrayPass: () => assertNotInt8ArrayPass,
|
|
101
|
+
assertNotJsonPrimitive: () => assertNotJsonPrimitive,
|
|
102
|
+
assertNotJsonPrimitivePass: () => assertNotJsonPrimitivePass,
|
|
103
|
+
assertNotMap: () => assertNotMap,
|
|
104
|
+
assertNotMapPass: () => assertNotMapPass,
|
|
105
|
+
assertNotNull: () => assertNotNull,
|
|
106
|
+
assertNotNullOrUndefined: () => assertNotNullOrUndefined,
|
|
107
|
+
assertNotNullOrUndefinedPass: () => assertNotNullOrUndefinedPass,
|
|
108
|
+
assertNotNullPass: () => assertNotNullPass,
|
|
109
|
+
assertNotNumber: () => assertNotNumber,
|
|
110
|
+
assertNotNumberPass: () => assertNotNumberPass,
|
|
111
|
+
assertNotObject: () => assertNotObject,
|
|
112
|
+
assertNotObjectPass: () => assertNotObjectPass,
|
|
113
|
+
assertNotPrimitive: () => assertNotPrimitive,
|
|
114
|
+
assertNotPrimitivePass: () => assertNotPrimitivePass,
|
|
115
|
+
assertNotPromise: () => assertNotPromise,
|
|
116
|
+
assertNotPromisePass: () => assertNotPromisePass,
|
|
117
|
+
assertNotReadableStream: () => assertNotReadableStream,
|
|
118
|
+
assertNotReadableStreamPass: () => assertNotReadableStreamPass,
|
|
119
|
+
assertNotRegExp: () => assertNotRegExp,
|
|
120
|
+
assertNotRegExpPass: () => assertNotRegExpPass,
|
|
121
|
+
assertNotSet: () => assertNotSet,
|
|
122
|
+
assertNotSetPass: () => assertNotSetPass,
|
|
123
|
+
assertNotString: () => assertNotString,
|
|
124
|
+
assertNotStringPass: () => assertNotStringPass,
|
|
125
|
+
assertNotSymbol: () => assertNotSymbol,
|
|
126
|
+
assertNotSymbolPass: () => assertNotSymbolPass,
|
|
127
|
+
assertNotType: () => assertNotType,
|
|
128
|
+
assertNotTypePass: () => assertNotTypePass,
|
|
129
|
+
assertNotTypedArray: () => assertNotTypedArray,
|
|
130
|
+
assertNotTypedArrayPass: () => assertNotTypedArrayPass,
|
|
131
|
+
assertNotUint16Array: () => assertNotUint16Array,
|
|
132
|
+
assertNotUint16ArrayPass: () => assertNotUint16ArrayPass,
|
|
133
|
+
assertNotUint32Array: () => assertNotUint32Array,
|
|
134
|
+
assertNotUint32ArrayPass: () => assertNotUint32ArrayPass,
|
|
135
|
+
assertNotUint8Array: () => assertNotUint8Array,
|
|
136
|
+
assertNotUint8ArrayPass: () => assertNotUint8ArrayPass,
|
|
137
|
+
assertNotUint8ClampedArray: () => assertNotUint8ClampedArray,
|
|
138
|
+
assertNotUint8ClampedArrayPass: () => assertNotUint8ClampedArrayPass,
|
|
139
|
+
assertNotValidDate: () => assertNotValidDate,
|
|
140
|
+
assertNotValidDatePass: () => assertNotValidDatePass,
|
|
141
|
+
assertNotWritableArray: () => assertNotWritableArray,
|
|
142
|
+
assertNotWritableArrayPass: () => assertNotWritableArrayPass,
|
|
143
|
+
assertNull: () => assertNull,
|
|
144
|
+
assertNullOrUndefined: () => assertNullOrUndefined,
|
|
145
|
+
assertNullOrUndefinedPass: () => assertNullOrUndefinedPass,
|
|
146
|
+
assertNullPass: () => assertNullPass,
|
|
147
|
+
assertNumber: () => assertNumber,
|
|
148
|
+
assertNumberPass: () => assertNumberPass,
|
|
149
|
+
assertObject: () => assertObject,
|
|
150
|
+
assertObjectPass: () => assertObjectPass,
|
|
151
|
+
assertPrimitive: () => assertPrimitive,
|
|
152
|
+
assertPrimitivePass: () => assertPrimitivePass,
|
|
153
|
+
assertPromise: () => assertPromise,
|
|
154
|
+
assertPromisePass: () => assertPromisePass,
|
|
155
|
+
assertReadableStream: () => assertReadableStream,
|
|
156
|
+
assertReadableStreamPass: () => assertReadableStreamPass,
|
|
157
|
+
assertRegExp: () => assertRegExp,
|
|
158
|
+
assertRegExpPass: () => assertRegExpPass,
|
|
159
|
+
assertSet: () => assertSet,
|
|
160
|
+
assertSetPass: () => assertSetPass,
|
|
161
|
+
assertString: () => assertString,
|
|
162
|
+
assertStringPass: () => assertStringPass,
|
|
163
|
+
assertSymbol: () => assertSymbol,
|
|
164
|
+
assertSymbolPass: () => assertSymbolPass,
|
|
165
|
+
assertType: () => assertType,
|
|
166
|
+
assertTypePass: () => assertTypePass,
|
|
167
|
+
assertTypedArray: () => assertTypedArray,
|
|
168
|
+
assertTypedArrayPass: () => assertTypedArrayPass,
|
|
169
|
+
assertUint16Array: () => assertUint16Array,
|
|
170
|
+
assertUint16ArrayPass: () => assertUint16ArrayPass,
|
|
171
|
+
assertUint32Array: () => assertUint32Array,
|
|
172
|
+
assertUint32ArrayPass: () => assertUint32ArrayPass,
|
|
173
|
+
assertUint8Array: () => assertUint8Array,
|
|
174
|
+
assertUint8ArrayPass: () => assertUint8ArrayPass,
|
|
175
|
+
assertUint8ClampedArray: () => assertUint8ClampedArray,
|
|
176
|
+
assertUint8ClampedArrayPass: () => assertUint8ClampedArrayPass,
|
|
177
|
+
assertUndefined: () => assertUndefined,
|
|
178
|
+
assertUndefinedPass: () => assertUndefinedPass,
|
|
179
|
+
assertValidDate: () => assertValidDate,
|
|
180
|
+
assertValidDatePass: () => assertValidDatePass,
|
|
181
|
+
assertWritableArray: () => assertWritableArray,
|
|
182
|
+
assertWritableArrayPass: () => assertWritableArrayPass,
|
|
183
|
+
isArray: () => isArray,
|
|
184
|
+
isArrayBuffer: () => isArrayBuffer,
|
|
185
|
+
isArrayBufferView: () => isArrayBufferView,
|
|
186
|
+
isBigInt: () => isBigInt,
|
|
187
|
+
isBigInt64Array: () => isBigInt64Array,
|
|
188
|
+
isBigUint64Array: () => isBigUint64Array,
|
|
189
|
+
isBinaryData: () => isBinaryData,
|
|
190
|
+
isBlob: () => isBlob,
|
|
191
|
+
isBoolean: () => isBoolean,
|
|
192
|
+
isDataView: () => isDataView,
|
|
193
|
+
isDate: () => isDate,
|
|
194
|
+
isDefined: () => isDefined,
|
|
195
|
+
isError: () => isError,
|
|
196
|
+
isFloat32Array: () => isFloat32Array,
|
|
197
|
+
isFloat64Array: () => isFloat64Array,
|
|
198
|
+
isFunction: () => isFunction,
|
|
199
|
+
isInt16Array: () => isInt16Array,
|
|
200
|
+
isInt32Array: () => isInt32Array,
|
|
201
|
+
isInt8Array: () => isInt8Array,
|
|
202
|
+
isJsonPrimitive: () => isJsonPrimitive,
|
|
203
|
+
isMap: () => isMap,
|
|
204
|
+
isNotArray: () => isNotArray,
|
|
205
|
+
isNotArrayBuffer: () => isNotArrayBuffer,
|
|
206
|
+
isNotArrayBufferView: () => isNotArrayBufferView,
|
|
207
|
+
isNotBigInt: () => isNotBigInt,
|
|
208
|
+
isNotBigInt64Array: () => isNotBigInt64Array,
|
|
209
|
+
isNotBigUint64Array: () => isNotBigUint64Array,
|
|
210
|
+
isNotBinaryData: () => isNotBinaryData,
|
|
211
|
+
isNotBlob: () => isNotBlob,
|
|
212
|
+
isNotBoolean: () => isNotBoolean,
|
|
213
|
+
isNotDataView: () => isNotDataView,
|
|
214
|
+
isNotDate: () => isNotDate,
|
|
215
|
+
isNotError: () => isNotError,
|
|
216
|
+
isNotFloat32Array: () => isNotFloat32Array,
|
|
217
|
+
isNotFloat64Array: () => isNotFloat64Array,
|
|
218
|
+
isNotFunction: () => isNotFunction,
|
|
219
|
+
isNotInt16Array: () => isNotInt16Array,
|
|
220
|
+
isNotInt32Array: () => isNotInt32Array,
|
|
221
|
+
isNotInt8Array: () => isNotInt8Array,
|
|
222
|
+
isNotJsonPrimitive: () => isNotJsonPrimitive,
|
|
223
|
+
isNotMap: () => isNotMap,
|
|
224
|
+
isNotNull: () => isNotNull,
|
|
225
|
+
isNotNullOrUndefined: () => isNotNullOrUndefined,
|
|
226
|
+
isNotNumber: () => isNotNumber,
|
|
227
|
+
isNotObject: () => isNotObject,
|
|
228
|
+
isNotPrimitive: () => isNotPrimitive,
|
|
229
|
+
isNotPromise: () => isNotPromise,
|
|
230
|
+
isNotReadableStream: () => isNotReadableStream,
|
|
231
|
+
isNotRegExp: () => isNotRegExp,
|
|
232
|
+
isNotSet: () => isNotSet,
|
|
233
|
+
isNotString: () => isNotString,
|
|
234
|
+
isNotSymbol: () => isNotSymbol,
|
|
235
|
+
isNotType: () => isNotType,
|
|
236
|
+
isNotTypedArray: () => isNotTypedArray,
|
|
237
|
+
isNotUint16Array: () => isNotUint16Array,
|
|
238
|
+
isNotUint32Array: () => isNotUint32Array,
|
|
239
|
+
isNotUint8Array: () => isNotUint8Array,
|
|
240
|
+
isNotUint8ClampedArray: () => isNotUint8ClampedArray,
|
|
241
|
+
isNotValidDate: () => isNotValidDate,
|
|
242
|
+
isNotWritableArray: () => isNotWritableArray,
|
|
243
|
+
isNull: () => isNull,
|
|
244
|
+
isNullOrUndefined: () => isNullOrUndefined,
|
|
245
|
+
isNumber: () => isNumber,
|
|
246
|
+
isObject: () => isObject,
|
|
247
|
+
isPrimitive: () => isPrimitive,
|
|
248
|
+
isPromise: () => isPromise,
|
|
249
|
+
isReadableStream: () => isReadableStream,
|
|
250
|
+
isRegExp: () => isRegExp,
|
|
251
|
+
isSet: () => isSet,
|
|
252
|
+
isString: () => isString,
|
|
253
|
+
isSymbol: () => isSymbol,
|
|
254
|
+
isType: () => isType,
|
|
255
|
+
isTypedArray: () => isTypedArray,
|
|
256
|
+
isUint16Array: () => isUint16Array,
|
|
257
|
+
isUint32Array: () => isUint32Array,
|
|
258
|
+
isUint8Array: () => isUint8Array,
|
|
259
|
+
isUint8ClampedArray: () => isUint8ClampedArray,
|
|
260
|
+
isUndefined: () => isUndefined,
|
|
261
|
+
isValidDate: () => isValidDate,
|
|
262
|
+
isWritableArray: () => isWritableArray
|
|
263
|
+
});
|
|
264
|
+
module.exports = __toCommonJS(type_guards_exports);
|
|
265
|
+
var import_supports = require("../supports.js");
|
|
266
|
+
var import_assertion_error = require("../error/assertion.error.js");
|
|
267
|
+
function assert(condition, message = "assertion failed") {
|
|
268
|
+
if (!condition) {
|
|
269
|
+
throw new import_assertion_error.AssertionError(isFunction(message) ? message() : message);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
function assertNot(condition, message = "assertion failed") {
|
|
273
|
+
if (condition) {
|
|
274
|
+
throw new import_assertion_error.AssertionError(isFunction(message) ? message() : message);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
function isType(type, value) {
|
|
278
|
+
return value instanceof type;
|
|
279
|
+
}
|
|
280
|
+
function isNotType(type, value) {
|
|
281
|
+
return !isType(type, value);
|
|
282
|
+
}
|
|
283
|
+
function assertType(type, value, message = () => `Expected value to be of type ${type.name}.`) {
|
|
284
|
+
assert(isType(type, value), message);
|
|
285
|
+
}
|
|
286
|
+
function assertNotType(type, value, message = () => `Expected value to be not of type ${type.name}.`) {
|
|
287
|
+
assert(isNotType(type, value), message);
|
|
288
|
+
}
|
|
289
|
+
function assertTypePass(type, value, message) {
|
|
290
|
+
assertType(type, value, message);
|
|
291
|
+
return value;
|
|
292
|
+
}
|
|
293
|
+
function assertNotTypePass(type, value, message) {
|
|
294
|
+
assertNotType(type, value, message);
|
|
295
|
+
return value;
|
|
296
|
+
}
|
|
297
|
+
function isUndefined(value) {
|
|
298
|
+
return value === void 0;
|
|
299
|
+
}
|
|
300
|
+
function isDefined(value) {
|
|
301
|
+
return value !== void 0;
|
|
302
|
+
}
|
|
303
|
+
function assertUndefined(value, message = "Expected value to be undefined.") {
|
|
304
|
+
assert(isUndefined(value), message);
|
|
305
|
+
}
|
|
306
|
+
function assertDefined(value, message = "Expected value to not be undefined.") {
|
|
307
|
+
assert(isDefined(value), message);
|
|
308
|
+
}
|
|
309
|
+
function assertUndefinedPass(value, message) {
|
|
310
|
+
assertUndefined(value, message);
|
|
311
|
+
return value;
|
|
312
|
+
}
|
|
313
|
+
function assertDefinedPass(value, message) {
|
|
314
|
+
assertDefined(value, message);
|
|
315
|
+
return value;
|
|
316
|
+
}
|
|
317
|
+
function isNull(value) {
|
|
318
|
+
return value === null;
|
|
319
|
+
}
|
|
320
|
+
function isNotNull(value) {
|
|
321
|
+
return value !== null;
|
|
322
|
+
}
|
|
323
|
+
function assertNull(value, message = "Expected value to be null.") {
|
|
324
|
+
assert(isNull(value), message);
|
|
325
|
+
}
|
|
326
|
+
function assertNotNull(value, message = "Expected value to not be null.") {
|
|
327
|
+
assert(isNotNull(value), message);
|
|
328
|
+
}
|
|
329
|
+
function assertNullPass(value, message) {
|
|
330
|
+
assertNull(value, message);
|
|
331
|
+
return value;
|
|
332
|
+
}
|
|
333
|
+
function assertNotNullPass(value, message) {
|
|
334
|
+
assertNotNull(value, message);
|
|
335
|
+
return value;
|
|
336
|
+
}
|
|
337
|
+
function isNullOrUndefined(value) {
|
|
338
|
+
return value === null || value === void 0;
|
|
339
|
+
}
|
|
340
|
+
function isNotNullOrUndefined(value) {
|
|
341
|
+
return !isNullOrUndefined(value);
|
|
342
|
+
}
|
|
343
|
+
function assertNullOrUndefined(value, message = "Expected value to be null or undefined.") {
|
|
344
|
+
assert(isNullOrUndefined(value), message);
|
|
345
|
+
}
|
|
346
|
+
function assertNotNullOrUndefined(value, message = "Expected value to not be null or undefined.") {
|
|
347
|
+
assert(isNotNullOrUndefined(value), message);
|
|
348
|
+
}
|
|
349
|
+
function assertNullOrUndefinedPass(value, message) {
|
|
350
|
+
assertNullOrUndefined(value, message);
|
|
351
|
+
return value;
|
|
352
|
+
}
|
|
353
|
+
function assertNotNullOrUndefinedPass(value, message) {
|
|
354
|
+
assertNotNullOrUndefined(value, message);
|
|
355
|
+
return value;
|
|
356
|
+
}
|
|
357
|
+
function isNumber(value) {
|
|
358
|
+
return typeof value == "number";
|
|
359
|
+
}
|
|
360
|
+
function isNotNumber(value) {
|
|
361
|
+
return !isNumber(value);
|
|
362
|
+
}
|
|
363
|
+
function assertNumber(value, message = "Expected value to be number.") {
|
|
364
|
+
assert(isNumber(value), message);
|
|
365
|
+
}
|
|
366
|
+
function assertNotNumber(value, message = "Expected value to not be number.") {
|
|
367
|
+
assert(isNotNumber(value), message);
|
|
368
|
+
}
|
|
369
|
+
function assertNumberPass(value, message) {
|
|
370
|
+
assertNumber(value, message);
|
|
371
|
+
return value;
|
|
372
|
+
}
|
|
373
|
+
function assertNotNumberPass(value, message) {
|
|
374
|
+
assertNotNumber(value, message);
|
|
375
|
+
return value;
|
|
376
|
+
}
|
|
377
|
+
function isString(value) {
|
|
378
|
+
return typeof value == "string";
|
|
379
|
+
}
|
|
380
|
+
function isNotString(value) {
|
|
381
|
+
return !isString(value);
|
|
382
|
+
}
|
|
383
|
+
function assertString(value, message = "Expected value to be string.") {
|
|
384
|
+
assert(isString(value), message);
|
|
385
|
+
}
|
|
386
|
+
function assertNotString(value, message = "Expected value to not be string.") {
|
|
387
|
+
assert(isNotString(value), message);
|
|
388
|
+
}
|
|
389
|
+
function assertStringPass(value, message) {
|
|
390
|
+
assertString(value, message);
|
|
391
|
+
return value;
|
|
392
|
+
}
|
|
393
|
+
function assertNotStringPass(value, message) {
|
|
394
|
+
assertNotString(value, message);
|
|
395
|
+
return value;
|
|
396
|
+
}
|
|
397
|
+
function isBoolean(value) {
|
|
398
|
+
return typeof value == "boolean";
|
|
399
|
+
}
|
|
400
|
+
function isNotBoolean(value) {
|
|
401
|
+
return !isBoolean(value);
|
|
402
|
+
}
|
|
403
|
+
function assertBoolean(value, message = "Expected value to be boolean.") {
|
|
404
|
+
assert(isBoolean(value), message);
|
|
405
|
+
}
|
|
406
|
+
function assertNotBoolean(value, message = "Expected value to not be boolean.") {
|
|
407
|
+
assert(isNotBoolean(value), message);
|
|
408
|
+
}
|
|
409
|
+
function assertBooleanPass(value, message) {
|
|
410
|
+
assertBoolean(value, message);
|
|
411
|
+
return value;
|
|
412
|
+
}
|
|
413
|
+
function assertNotBooleanPass(value, message) {
|
|
414
|
+
assertNotBoolean(value, message);
|
|
415
|
+
return value;
|
|
416
|
+
}
|
|
417
|
+
function isBigInt(value) {
|
|
418
|
+
return typeof value == "bigint";
|
|
419
|
+
}
|
|
420
|
+
function isNotBigInt(value) {
|
|
421
|
+
return !isBigInt(value);
|
|
422
|
+
}
|
|
423
|
+
function assertBigInt(value, message = "Expected value to be bigint.") {
|
|
424
|
+
assert(isBigInt(value), message);
|
|
425
|
+
}
|
|
426
|
+
function assertNotBigInt(value, message = "Expected value to not be bigint.") {
|
|
427
|
+
assert(isNotBigInt(value), message);
|
|
428
|
+
}
|
|
429
|
+
function assertBigIntPass(value, message) {
|
|
430
|
+
assertBigInt(value, message);
|
|
431
|
+
return value;
|
|
432
|
+
}
|
|
433
|
+
function assertNotBigIntPass(value, message) {
|
|
434
|
+
assertNotBigInt(value, message);
|
|
435
|
+
return value;
|
|
436
|
+
}
|
|
437
|
+
function isFunction(value) {
|
|
438
|
+
return typeof value == "function";
|
|
439
|
+
}
|
|
440
|
+
function isNotFunction(value) {
|
|
441
|
+
return !isFunction(value);
|
|
442
|
+
}
|
|
443
|
+
function assertFunction(value, message = "Expected value to be function.") {
|
|
444
|
+
assert(isFunction(value), message);
|
|
445
|
+
}
|
|
446
|
+
function assertNotFunction(value, message = "Expected value to not be function.") {
|
|
447
|
+
assert(isNotFunction(value), message);
|
|
448
|
+
}
|
|
449
|
+
function assertFunctionPass(value, message) {
|
|
450
|
+
assertFunction(value, message);
|
|
451
|
+
return value;
|
|
452
|
+
}
|
|
453
|
+
function assertNotFunctionPass(value, message) {
|
|
454
|
+
assertNotFunction(value, message);
|
|
455
|
+
return value;
|
|
456
|
+
}
|
|
457
|
+
function isSymbol(value) {
|
|
458
|
+
return typeof value == "symbol";
|
|
459
|
+
}
|
|
460
|
+
function isNotSymbol(value) {
|
|
461
|
+
return !isSymbol(value);
|
|
462
|
+
}
|
|
463
|
+
function assertSymbol(value, message = "Expected value to be symbol.") {
|
|
464
|
+
assert(isSymbol(value), message);
|
|
465
|
+
}
|
|
466
|
+
function assertNotSymbol(value, message = "Expected value to not be symbol.") {
|
|
467
|
+
assert(isNotSymbol(value), message);
|
|
468
|
+
}
|
|
469
|
+
function assertSymbolPass(value, message) {
|
|
470
|
+
assertSymbol(value, message);
|
|
471
|
+
return value;
|
|
472
|
+
}
|
|
473
|
+
function assertNotSymbolPass(value, message) {
|
|
474
|
+
assertNotSymbol(value, message);
|
|
475
|
+
return value;
|
|
476
|
+
}
|
|
477
|
+
function isObject(value) {
|
|
478
|
+
return value?.constructor == Object;
|
|
479
|
+
}
|
|
480
|
+
function isNotObject(value) {
|
|
481
|
+
return !isObject(value);
|
|
482
|
+
}
|
|
483
|
+
function assertObject(value, message = "Expected value to be object.") {
|
|
484
|
+
assert(isObject(value), message);
|
|
485
|
+
}
|
|
486
|
+
function assertNotObject(value, message = "Expected value to not be object.") {
|
|
487
|
+
assert(isNotObject(value), message);
|
|
488
|
+
}
|
|
489
|
+
function assertObjectPass(value, message) {
|
|
490
|
+
assertObject(value, message);
|
|
491
|
+
return value;
|
|
492
|
+
}
|
|
493
|
+
function assertNotObjectPass(value, message) {
|
|
494
|
+
assertNotObject(value, message);
|
|
495
|
+
return value;
|
|
496
|
+
}
|
|
497
|
+
function isPrimitive(value) {
|
|
498
|
+
const type = typeof value;
|
|
499
|
+
return type == "string" || type == "number" || type == "boolean" || type == "bigint" || type == "symbol" || value === null || value === void 0;
|
|
500
|
+
}
|
|
501
|
+
function isNotPrimitive(value) {
|
|
502
|
+
return !isPrimitive(value);
|
|
503
|
+
}
|
|
504
|
+
function assertPrimitive(value, message = "Expected value to be primitive.") {
|
|
505
|
+
assert(isPrimitive(value), message);
|
|
506
|
+
}
|
|
507
|
+
function assertNotPrimitive(value, message = "Expected value to not be primitive.") {
|
|
508
|
+
assert(isNotPrimitive(value), message);
|
|
509
|
+
}
|
|
510
|
+
function assertPrimitivePass(value, message) {
|
|
511
|
+
assertPrimitive(value, message);
|
|
512
|
+
return value;
|
|
513
|
+
}
|
|
514
|
+
function assertNotPrimitivePass(value, message) {
|
|
515
|
+
assertNotPrimitive(value, message);
|
|
516
|
+
return value;
|
|
517
|
+
}
|
|
518
|
+
function isJsonPrimitive(value) {
|
|
519
|
+
const type = typeof value;
|
|
520
|
+
return type == "string" || type == "number" || type == "boolean" || value === null;
|
|
521
|
+
}
|
|
522
|
+
function isNotJsonPrimitive(value) {
|
|
523
|
+
return !isJsonPrimitive(value);
|
|
524
|
+
}
|
|
525
|
+
function assertJsonPrimitive(value, message = "Expected value to be json-primitive.") {
|
|
526
|
+
assert(isJsonPrimitive(value), message);
|
|
527
|
+
}
|
|
528
|
+
function assertNotJsonPrimitive(value, message = "Expected value to not be json-primitive.") {
|
|
529
|
+
assert(isNotJsonPrimitive(value), message);
|
|
530
|
+
}
|
|
531
|
+
function assertJsonPrimitivePass(value, message) {
|
|
532
|
+
assertJsonPrimitive(value, message);
|
|
533
|
+
return value;
|
|
534
|
+
}
|
|
535
|
+
function assertNotJsonPrimitivePass(value, message) {
|
|
536
|
+
assertNotJsonPrimitive(value, message);
|
|
537
|
+
return value;
|
|
538
|
+
}
|
|
539
|
+
function isDate(value) {
|
|
540
|
+
return value instanceof Date;
|
|
541
|
+
}
|
|
542
|
+
function isNotDate(value) {
|
|
543
|
+
return !isDate(value);
|
|
544
|
+
}
|
|
545
|
+
function assertDate(value, message = "Expected value to be Date.") {
|
|
546
|
+
assert(isDate(value), message);
|
|
547
|
+
}
|
|
548
|
+
function assertNotDate(value, message = "Expected value to not be Date.") {
|
|
549
|
+
assert(isNotDate(value), message);
|
|
550
|
+
}
|
|
551
|
+
function assertDatePass(value, message) {
|
|
552
|
+
assertDate(value, message);
|
|
553
|
+
return value;
|
|
554
|
+
}
|
|
555
|
+
function assertNotDatePass(value, message) {
|
|
556
|
+
assertNotDate(value, message);
|
|
557
|
+
return value;
|
|
558
|
+
}
|
|
559
|
+
function isValidDate(value) {
|
|
560
|
+
return isDate(value) && !Number.isNaN(value.getTime());
|
|
561
|
+
}
|
|
562
|
+
function isNotValidDate(value) {
|
|
563
|
+
return !isValidDate(value);
|
|
564
|
+
}
|
|
565
|
+
function assertValidDate(value, message = "Expected value to be a valid Date.") {
|
|
566
|
+
assert(isValidDate(value), message);
|
|
567
|
+
}
|
|
568
|
+
function assertNotValidDate(value, message = "Expected value to not be a valid Date.") {
|
|
569
|
+
assert(isNotValidDate(value), message);
|
|
570
|
+
}
|
|
571
|
+
function assertValidDatePass(value, message) {
|
|
572
|
+
assertValidDate(value, message);
|
|
573
|
+
return value;
|
|
574
|
+
}
|
|
575
|
+
function assertNotValidDatePass(value, message) {
|
|
576
|
+
assertNotValidDate(value, message);
|
|
577
|
+
return value;
|
|
578
|
+
}
|
|
579
|
+
function isRegExp(value) {
|
|
580
|
+
return value instanceof RegExp;
|
|
581
|
+
}
|
|
582
|
+
function isNotRegExp(value) {
|
|
583
|
+
return !isRegExp(value);
|
|
584
|
+
}
|
|
585
|
+
function assertRegExp(value, message = "Expected value to be RegExp.") {
|
|
586
|
+
assert(isRegExp(value), message);
|
|
587
|
+
}
|
|
588
|
+
function assertNotRegExp(value, message = "Expected value to not be RegExp.") {
|
|
589
|
+
assert(isNotRegExp(value), message);
|
|
590
|
+
}
|
|
591
|
+
function assertRegExpPass(value, message) {
|
|
592
|
+
assertRegExp(value, message);
|
|
593
|
+
return value;
|
|
594
|
+
}
|
|
595
|
+
function assertNotRegExpPass(value, message) {
|
|
596
|
+
assertNotRegExp(value, message);
|
|
597
|
+
return value;
|
|
598
|
+
}
|
|
599
|
+
function isArray(value) {
|
|
600
|
+
return Array.isArray(value);
|
|
601
|
+
}
|
|
602
|
+
function isNotArray(value) {
|
|
603
|
+
return !isArray(value);
|
|
604
|
+
}
|
|
605
|
+
function assertArray(value, message = "Expected value to be Array.") {
|
|
606
|
+
assert(isArray(value), message);
|
|
607
|
+
}
|
|
608
|
+
function assertNotArray(value, message = "Expected value to not be Array.") {
|
|
609
|
+
assert(isNotArray(value), message);
|
|
610
|
+
}
|
|
611
|
+
function assertArrayPass(value, message) {
|
|
612
|
+
assertArray(value, message);
|
|
613
|
+
return value;
|
|
614
|
+
}
|
|
615
|
+
function assertNotArrayPass(value, message) {
|
|
616
|
+
assertNotArray(value, message);
|
|
617
|
+
return value;
|
|
618
|
+
}
|
|
619
|
+
function isWritableArray(value) {
|
|
620
|
+
return isArray(value);
|
|
621
|
+
}
|
|
622
|
+
function isNotWritableArray(value) {
|
|
623
|
+
return isNotArray(value);
|
|
624
|
+
}
|
|
625
|
+
function assertWritableArray(value, message = "Expected value to be Array.") {
|
|
626
|
+
assertArray(value, message);
|
|
627
|
+
}
|
|
628
|
+
function assertNotWritableArray(value, message = "Expected value to not be Array.") {
|
|
629
|
+
assertNotArray(value, message);
|
|
630
|
+
}
|
|
631
|
+
function assertWritableArrayPass(value, message) {
|
|
632
|
+
return assertArrayPass(value, message);
|
|
633
|
+
}
|
|
634
|
+
function assertNotWritableArrayPass(value, message) {
|
|
635
|
+
return assertNotArrayPass(value, message);
|
|
636
|
+
}
|
|
637
|
+
function isBlob(value) {
|
|
638
|
+
return import_supports.supportsBlob && value instanceof Blob;
|
|
639
|
+
}
|
|
640
|
+
function isNotBlob(value) {
|
|
641
|
+
return !isBlob(value);
|
|
642
|
+
}
|
|
643
|
+
function assertBlob(value, message = "Expected value to be Blob.") {
|
|
644
|
+
assert(isBlob(value), message);
|
|
645
|
+
}
|
|
646
|
+
function assertNotBlob(value, message = "Expected value to not be Blob.") {
|
|
647
|
+
assert(isNotBlob(value), message);
|
|
648
|
+
}
|
|
649
|
+
function assertBlobPass(value, message) {
|
|
650
|
+
assertBlob(value, message);
|
|
651
|
+
return value;
|
|
652
|
+
}
|
|
653
|
+
function assertNotBlobPass(value, message) {
|
|
654
|
+
assertNotBlob(value, message);
|
|
655
|
+
return value;
|
|
656
|
+
}
|
|
657
|
+
function isBinaryData(value) {
|
|
658
|
+
return isArrayBuffer(value) || isArrayBufferView(value);
|
|
659
|
+
}
|
|
660
|
+
function isNotBinaryData(value) {
|
|
661
|
+
return !isBinaryData(value);
|
|
662
|
+
}
|
|
663
|
+
function assertBinaryData(value, message = "Expected value to be BinaryData.") {
|
|
664
|
+
assert(isBinaryData(value), message);
|
|
665
|
+
}
|
|
666
|
+
function assertNotBinaryData(value, message = "Expected value to not be BinaryData.") {
|
|
667
|
+
assert(isNotBinaryData(value), message);
|
|
668
|
+
}
|
|
669
|
+
function assertBinaryDataPass(value, message) {
|
|
670
|
+
assertBinaryData(value, message);
|
|
671
|
+
return value;
|
|
672
|
+
}
|
|
673
|
+
function assertNotBinaryDataPass(value, message) {
|
|
674
|
+
assertNotBinaryData(value, message);
|
|
675
|
+
return value;
|
|
676
|
+
}
|
|
677
|
+
function isArrayBuffer(value) {
|
|
678
|
+
return value instanceof ArrayBuffer;
|
|
679
|
+
}
|
|
680
|
+
function isNotArrayBuffer(value) {
|
|
681
|
+
return !isArrayBuffer(value);
|
|
682
|
+
}
|
|
683
|
+
function assertArrayBuffer(value, message = "Expected value to be ArrayBuffer.") {
|
|
684
|
+
assert(isArrayBuffer(value), message);
|
|
685
|
+
}
|
|
686
|
+
function assertNotArrayBuffer(value, message = "Expected value to not be ArrayBuffer.") {
|
|
687
|
+
assert(isNotArrayBuffer(value), message);
|
|
688
|
+
}
|
|
689
|
+
function assertArrayBufferPass(value, message) {
|
|
690
|
+
assertArrayBuffer(value, message);
|
|
691
|
+
return value;
|
|
692
|
+
}
|
|
693
|
+
function assertNotArrayBufferPass(value, message) {
|
|
694
|
+
assertNotArrayBuffer(value, message);
|
|
695
|
+
return value;
|
|
696
|
+
}
|
|
697
|
+
function isArrayBufferView(value) {
|
|
698
|
+
return ArrayBuffer.isView(value);
|
|
699
|
+
}
|
|
700
|
+
function isNotArrayBufferView(value) {
|
|
701
|
+
return !isArrayBufferView(value);
|
|
702
|
+
}
|
|
703
|
+
function assertArrayBufferView(value, message = "Expected value to be ArrayBufferView.") {
|
|
704
|
+
assert(isArrayBufferView(value), message);
|
|
705
|
+
}
|
|
706
|
+
function assertNotArrayBufferView(value, message = "Expected value to not be ArrayBufferView.") {
|
|
707
|
+
assert(isNotArrayBufferView(value), message);
|
|
708
|
+
}
|
|
709
|
+
function assertArrayBufferViewPass(value, message) {
|
|
710
|
+
assertArrayBufferView(value, message);
|
|
711
|
+
return value;
|
|
712
|
+
}
|
|
713
|
+
function assertNotArrayBufferViewPass(value, message) {
|
|
714
|
+
assertNotArrayBufferView(value, message);
|
|
715
|
+
return value;
|
|
716
|
+
}
|
|
717
|
+
function isTypedArray(value) {
|
|
718
|
+
return ArrayBuffer.isView(value) && isNotDataView(value);
|
|
719
|
+
}
|
|
720
|
+
function isNotTypedArray(value) {
|
|
721
|
+
return !isTypedArray(value);
|
|
722
|
+
}
|
|
723
|
+
function assertTypedArray(value, message = "Expected value to be TypedArray.") {
|
|
724
|
+
assert(isTypedArray(value), message);
|
|
725
|
+
}
|
|
726
|
+
function assertNotTypedArray(value, message = "Expected value to not be TypedArray.") {
|
|
727
|
+
assert(isNotTypedArray(value), message);
|
|
728
|
+
}
|
|
729
|
+
function assertTypedArrayPass(value, message) {
|
|
730
|
+
assertTypedArray(value, message);
|
|
731
|
+
return value;
|
|
732
|
+
}
|
|
733
|
+
function assertNotTypedArrayPass(value, message) {
|
|
734
|
+
assertNotTypedArray(value, message);
|
|
735
|
+
return value;
|
|
736
|
+
}
|
|
737
|
+
function isInt8Array(value) {
|
|
738
|
+
return value instanceof Int8Array;
|
|
739
|
+
}
|
|
740
|
+
function isNotInt8Array(value) {
|
|
741
|
+
return !isInt8Array(value);
|
|
742
|
+
}
|
|
743
|
+
function assertInt8Array(value, message = "Expected value to be Int8Array.") {
|
|
744
|
+
assert(isInt8Array(value), message);
|
|
745
|
+
}
|
|
746
|
+
function assertNotInt8Array(value, message = "Expected value to not be Int8Array.") {
|
|
747
|
+
assert(isNotInt8Array(value), message);
|
|
748
|
+
}
|
|
749
|
+
function assertInt8ArrayPass(value, message) {
|
|
750
|
+
assertInt8Array(value, message);
|
|
751
|
+
return value;
|
|
752
|
+
}
|
|
753
|
+
function assertNotInt8ArrayPass(value, message) {
|
|
754
|
+
assertNotInt8Array(value, message);
|
|
755
|
+
return value;
|
|
756
|
+
}
|
|
757
|
+
function isUint8Array(value) {
|
|
758
|
+
return value instanceof Uint8Array;
|
|
759
|
+
}
|
|
760
|
+
function isNotUint8Array(value) {
|
|
761
|
+
return !isUint8Array(value);
|
|
762
|
+
}
|
|
763
|
+
function assertUint8Array(value, message = "Expected value to be Uint8Array.") {
|
|
764
|
+
assert(isUint8Array(value), message);
|
|
765
|
+
}
|
|
766
|
+
function assertNotUint8Array(value, message = "Expected value to not be Uint8Array.") {
|
|
767
|
+
assert(isNotUint8Array(value), message);
|
|
768
|
+
}
|
|
769
|
+
function assertUint8ArrayPass(value, message) {
|
|
770
|
+
assertUint8Array(value, message);
|
|
771
|
+
return value;
|
|
772
|
+
}
|
|
773
|
+
function assertNotUint8ArrayPass(value, message) {
|
|
774
|
+
assertNotUint8Array(value, message);
|
|
775
|
+
return value;
|
|
776
|
+
}
|
|
777
|
+
function isUint8ClampedArray(value) {
|
|
778
|
+
return value instanceof Uint8ClampedArray;
|
|
779
|
+
}
|
|
780
|
+
function isNotUint8ClampedArray(value) {
|
|
781
|
+
return !isUint8ClampedArray(value);
|
|
782
|
+
}
|
|
783
|
+
function assertUint8ClampedArray(value, message = "Expected value to be Uint8ClampedArray.") {
|
|
784
|
+
assert(isUint8ClampedArray(value), message);
|
|
785
|
+
}
|
|
786
|
+
function assertNotUint8ClampedArray(value, message = "Expected value to not be Uint8ClampedArray.") {
|
|
787
|
+
assert(isNotUint8ClampedArray(value), message);
|
|
788
|
+
}
|
|
789
|
+
function assertUint8ClampedArrayPass(value, message) {
|
|
790
|
+
assertUint8ClampedArray(value, message);
|
|
791
|
+
return value;
|
|
792
|
+
}
|
|
793
|
+
function assertNotUint8ClampedArrayPass(value, message) {
|
|
794
|
+
assertNotUint8ClampedArray(value, message);
|
|
795
|
+
return value;
|
|
796
|
+
}
|
|
797
|
+
function isInt16Array(value) {
|
|
798
|
+
return value instanceof Int16Array;
|
|
799
|
+
}
|
|
800
|
+
function isNotInt16Array(value) {
|
|
801
|
+
return !isInt16Array(value);
|
|
802
|
+
}
|
|
803
|
+
function assertInt16Array(value, message = "Expected value to be Int16Array.") {
|
|
804
|
+
assert(isInt16Array(value), message);
|
|
805
|
+
}
|
|
806
|
+
function assertNotInt16Array(value, message = "Expected value to not be Int16Array.") {
|
|
807
|
+
assert(isNotInt16Array(value), message);
|
|
808
|
+
}
|
|
809
|
+
function assertInt16ArrayPass(value, message) {
|
|
810
|
+
assertInt16Array(value, message);
|
|
811
|
+
return value;
|
|
812
|
+
}
|
|
813
|
+
function assertNotInt16ArrayPass(value, message) {
|
|
814
|
+
assertNotInt16Array(value, message);
|
|
815
|
+
return value;
|
|
816
|
+
}
|
|
817
|
+
function isUint16Array(value) {
|
|
818
|
+
return value instanceof Uint16Array;
|
|
819
|
+
}
|
|
820
|
+
function isNotUint16Array(value) {
|
|
821
|
+
return !isUint16Array(value);
|
|
822
|
+
}
|
|
823
|
+
function assertUint16Array(value, message = "Expected value to be Uint16Array.") {
|
|
824
|
+
assert(isUint16Array(value), message);
|
|
825
|
+
}
|
|
826
|
+
function assertNotUint16Array(value, message = "Expected value to not be Uint16Array.") {
|
|
827
|
+
assert(isNotUint16Array(value), message);
|
|
828
|
+
}
|
|
829
|
+
function assertUint16ArrayPass(value, message) {
|
|
830
|
+
assertUint16Array(value, message);
|
|
831
|
+
return value;
|
|
832
|
+
}
|
|
833
|
+
function assertNotUint16ArrayPass(value, message) {
|
|
834
|
+
assertNotUint16Array(value, message);
|
|
835
|
+
return value;
|
|
836
|
+
}
|
|
837
|
+
function isInt32Array(value) {
|
|
838
|
+
return value instanceof Int32Array;
|
|
839
|
+
}
|
|
840
|
+
function isNotInt32Array(value) {
|
|
841
|
+
return !isInt32Array(value);
|
|
842
|
+
}
|
|
843
|
+
function assertInt32Array(value, message = "Expected value to be Int32Array.") {
|
|
844
|
+
assert(isInt32Array(value), message);
|
|
845
|
+
}
|
|
846
|
+
function assertNotInt32Array(value, message = "Expected value to not be Int32Array.") {
|
|
847
|
+
assert(isNotInt32Array(value), message);
|
|
848
|
+
}
|
|
849
|
+
function assertInt32ArrayPass(value, message) {
|
|
850
|
+
assertInt32Array(value, message);
|
|
851
|
+
return value;
|
|
852
|
+
}
|
|
853
|
+
function assertNotInt32ArrayPass(value, message) {
|
|
854
|
+
assertNotInt32Array(value, message);
|
|
855
|
+
return value;
|
|
856
|
+
}
|
|
857
|
+
function isUint32Array(value) {
|
|
858
|
+
return value instanceof Uint32Array;
|
|
859
|
+
}
|
|
860
|
+
function isNotUint32Array(value) {
|
|
861
|
+
return !isUint32Array(value);
|
|
862
|
+
}
|
|
863
|
+
function assertUint32Array(value, message = "Expected value to be Uint32Array.") {
|
|
864
|
+
assert(isUint32Array(value), message);
|
|
865
|
+
}
|
|
866
|
+
function assertNotUint32Array(value, message = "Expected value to not be Uint32Array.") {
|
|
867
|
+
assert(isNotUint32Array(value), message);
|
|
868
|
+
}
|
|
869
|
+
function assertUint32ArrayPass(value, message) {
|
|
870
|
+
assertUint32Array(value, message);
|
|
871
|
+
return value;
|
|
872
|
+
}
|
|
873
|
+
function assertNotUint32ArrayPass(value, message) {
|
|
874
|
+
assertNotUint32Array(value, message);
|
|
875
|
+
return value;
|
|
876
|
+
}
|
|
877
|
+
function isFloat32Array(value) {
|
|
878
|
+
return value instanceof Float32Array;
|
|
879
|
+
}
|
|
880
|
+
function isNotFloat32Array(value) {
|
|
881
|
+
return !isFloat32Array(value);
|
|
882
|
+
}
|
|
883
|
+
function assertFloat32Array(value, message = "Expected value to be Float32Array.") {
|
|
884
|
+
assert(isFloat32Array(value), message);
|
|
885
|
+
}
|
|
886
|
+
function assertNotFloat32Array(value, message = "Expected value to not be Float32Array.") {
|
|
887
|
+
assert(isNotFloat32Array(value), message);
|
|
888
|
+
}
|
|
889
|
+
function assertFloat32ArrayPass(value, message) {
|
|
890
|
+
assertFloat32Array(value, message);
|
|
891
|
+
return value;
|
|
892
|
+
}
|
|
893
|
+
function assertNotFloat32ArrayPass(value, message) {
|
|
894
|
+
assertNotFloat32Array(value, message);
|
|
895
|
+
return value;
|
|
896
|
+
}
|
|
897
|
+
function isFloat64Array(value) {
|
|
898
|
+
return value instanceof Float64Array;
|
|
899
|
+
}
|
|
900
|
+
function isNotFloat64Array(value) {
|
|
901
|
+
return !isFloat64Array(value);
|
|
902
|
+
}
|
|
903
|
+
function assertFloat64Array(value, message = "Expected value to be Float64Array.") {
|
|
904
|
+
assert(isFloat64Array(value), message);
|
|
905
|
+
}
|
|
906
|
+
function assertNotFloat64Array(value, message = "Expected value to not be Float64Array.") {
|
|
907
|
+
assert(isNotFloat64Array(value), message);
|
|
908
|
+
}
|
|
909
|
+
function assertFloat64ArrayPass(value, message) {
|
|
910
|
+
assertFloat64Array(value, message);
|
|
911
|
+
return value;
|
|
912
|
+
}
|
|
913
|
+
function assertNotFloat64ArrayPass(value, message) {
|
|
914
|
+
assertNotFloat64Array(value, message);
|
|
915
|
+
return value;
|
|
916
|
+
}
|
|
917
|
+
function isBigInt64Array(value) {
|
|
918
|
+
return value instanceof BigInt64Array;
|
|
919
|
+
}
|
|
920
|
+
function isNotBigInt64Array(value) {
|
|
921
|
+
return !isBigInt64Array(value);
|
|
922
|
+
}
|
|
923
|
+
function assertBigInt64Array(value, message = "Expected value to be BigInt64Array.") {
|
|
924
|
+
assert(isBigInt64Array(value), message);
|
|
925
|
+
}
|
|
926
|
+
function assertNotBigInt64Array(value, message = "Expected value to not be BigInt64Array.") {
|
|
927
|
+
assert(isNotBigInt64Array(value), message);
|
|
928
|
+
}
|
|
929
|
+
function assertBigInt64ArrayPass(value, message) {
|
|
930
|
+
assertBigInt64Array(value, message);
|
|
931
|
+
return value;
|
|
932
|
+
}
|
|
933
|
+
function assertNotBigInt64ArrayPass(value, message) {
|
|
934
|
+
assertNotBigInt64Array(value, message);
|
|
935
|
+
return value;
|
|
936
|
+
}
|
|
937
|
+
function isBigUint64Array(value) {
|
|
938
|
+
return value instanceof BigUint64Array;
|
|
939
|
+
}
|
|
940
|
+
function isNotBigUint64Array(value) {
|
|
941
|
+
return !isBigUint64Array(value);
|
|
942
|
+
}
|
|
943
|
+
function assertBigUint64Array(value, message = "Expected value to be BigUint64Array.") {
|
|
944
|
+
assert(isBigUint64Array(value), message);
|
|
945
|
+
}
|
|
946
|
+
function assertNotBigUint64Array(value, message = "Expected value to not be BigUint64Array.") {
|
|
947
|
+
assert(isNotBigUint64Array(value), message);
|
|
948
|
+
}
|
|
949
|
+
function assertBigUint64ArrayPass(value, message) {
|
|
950
|
+
assertBigUint64Array(value, message);
|
|
951
|
+
return value;
|
|
952
|
+
}
|
|
953
|
+
function assertNotBigUint64ArrayPass(value, message) {
|
|
954
|
+
assertNotBigUint64Array(value, message);
|
|
955
|
+
return value;
|
|
956
|
+
}
|
|
957
|
+
function isDataView(value) {
|
|
958
|
+
return value instanceof DataView;
|
|
959
|
+
}
|
|
960
|
+
function isNotDataView(value) {
|
|
961
|
+
return !isDataView(value);
|
|
962
|
+
}
|
|
963
|
+
function assertDataView(value, message = "Expected value to be DataView.") {
|
|
964
|
+
assert(isDataView(value), message);
|
|
965
|
+
}
|
|
966
|
+
function assertNotDataView(value, message = "Expected value to not be DataView.") {
|
|
967
|
+
assert(isNotDataView(value), message);
|
|
968
|
+
}
|
|
969
|
+
function assertDataViewPass(value, message) {
|
|
970
|
+
assertDataView(value, message);
|
|
971
|
+
return value;
|
|
972
|
+
}
|
|
973
|
+
function assertNotDataViewPass(value, message) {
|
|
974
|
+
assertNotDataView(value, message);
|
|
975
|
+
return value;
|
|
976
|
+
}
|
|
977
|
+
function isSet(value) {
|
|
978
|
+
return value instanceof Set;
|
|
979
|
+
}
|
|
980
|
+
function isNotSet(value) {
|
|
981
|
+
return !isSet(value);
|
|
982
|
+
}
|
|
983
|
+
function assertSet(value, message = "Expected value to be Set.") {
|
|
984
|
+
assert(isSet(value), message);
|
|
985
|
+
}
|
|
986
|
+
function assertNotSet(value, message = "Expected value to not be Set.") {
|
|
987
|
+
assert(isNotSet(value), message);
|
|
988
|
+
}
|
|
989
|
+
function assertSetPass(value, message) {
|
|
990
|
+
assertSet(value, message);
|
|
991
|
+
return value;
|
|
992
|
+
}
|
|
993
|
+
function assertNotSetPass(value, message) {
|
|
994
|
+
assertNotSet(value, message);
|
|
995
|
+
return value;
|
|
996
|
+
}
|
|
997
|
+
function isMap(value) {
|
|
998
|
+
return value instanceof Map;
|
|
999
|
+
}
|
|
1000
|
+
function isNotMap(value) {
|
|
1001
|
+
return !isMap(value);
|
|
1002
|
+
}
|
|
1003
|
+
function assertMap(value, message = "Expected value to be Map.") {
|
|
1004
|
+
assert(isMap(value), message);
|
|
1005
|
+
}
|
|
1006
|
+
function assertNotMap(value, message = "Expected value to not be Map.") {
|
|
1007
|
+
assert(isNotMap(value), message);
|
|
1008
|
+
}
|
|
1009
|
+
function assertMapPass(value, message) {
|
|
1010
|
+
assertMap(value, message);
|
|
1011
|
+
return value;
|
|
1012
|
+
}
|
|
1013
|
+
function assertNotMapPass(value, message) {
|
|
1014
|
+
assertNotMap(value, message);
|
|
1015
|
+
return value;
|
|
1016
|
+
}
|
|
1017
|
+
function isPromise(value) {
|
|
1018
|
+
return value instanceof Promise;
|
|
1019
|
+
}
|
|
1020
|
+
function isNotPromise(value) {
|
|
1021
|
+
return !isPromise(value);
|
|
1022
|
+
}
|
|
1023
|
+
function assertPromise(value, message = "Expected value to be Promise.") {
|
|
1024
|
+
assert(isPromise(value), message);
|
|
1025
|
+
}
|
|
1026
|
+
function assertNotPromise(value, message = "Expected value to not be Promise.") {
|
|
1027
|
+
assert(isNotPromise(value), message);
|
|
1028
|
+
}
|
|
1029
|
+
function assertPromisePass(value, message) {
|
|
1030
|
+
assertPromise(value, message);
|
|
1031
|
+
return value;
|
|
1032
|
+
}
|
|
1033
|
+
function assertNotPromisePass(value, message) {
|
|
1034
|
+
assertNotPromise(value, message);
|
|
1035
|
+
return value;
|
|
1036
|
+
}
|
|
1037
|
+
function isReadableStream(value) {
|
|
1038
|
+
return import_supports.supportsReadableStream && value instanceof ReadableStream;
|
|
1039
|
+
}
|
|
1040
|
+
function isNotReadableStream(value) {
|
|
1041
|
+
return !isReadableStream(value);
|
|
1042
|
+
}
|
|
1043
|
+
function assertReadableStream(value, message = "Expected value to be ReadableStream.") {
|
|
1044
|
+
assert(isReadableStream(value), message);
|
|
1045
|
+
}
|
|
1046
|
+
function assertNotReadableStream(value, message = "Expected value to not be ReadableStream.") {
|
|
1047
|
+
assert(isNotReadableStream(value), message);
|
|
1048
|
+
}
|
|
1049
|
+
function assertReadableStreamPass(value, message) {
|
|
1050
|
+
assertReadableStream(value, message);
|
|
1051
|
+
return value;
|
|
1052
|
+
}
|
|
1053
|
+
function assertNotReadableStreamPass(value, message) {
|
|
1054
|
+
assertNotReadableStream(value, message);
|
|
1055
|
+
return value;
|
|
1056
|
+
}
|
|
1057
|
+
function isError(value) {
|
|
1058
|
+
return value instanceof Error;
|
|
1059
|
+
}
|
|
1060
|
+
function isNotError(value) {
|
|
1061
|
+
return !isError(value);
|
|
1062
|
+
}
|
|
1063
|
+
function assertError(value, message = "Expected value to be Error.") {
|
|
1064
|
+
assert(isError(value), message);
|
|
1065
|
+
}
|
|
1066
|
+
function assertNotError(value, message = "Expected value to not be Error.") {
|
|
1067
|
+
assert(isNotError(value), message);
|
|
1068
|
+
}
|
|
1069
|
+
function assertErrorPass(value, message) {
|
|
1070
|
+
assertError(value, message);
|
|
1071
|
+
return value;
|
|
1072
|
+
}
|
|
1073
|
+
function assertNotErrorPass(value, message) {
|
|
1074
|
+
assertNotError(value, message);
|
|
1075
|
+
return value;
|
|
1076
|
+
}
|