@ariestools/sdk 7.0.3
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/LICENSE +165 -0
- package/README.md +45 -0
- package/dist/_pkg/api/neutral/ApiClient.d.ts +10 -0
- package/dist/_pkg/api/neutral/ApiConfig.d.ts +9 -0
- package/dist/_pkg/api/neutral/ApiEndpoint.d.ts +19 -0
- package/dist/_pkg/api/neutral/ApiStage.d.ts +11 -0
- package/dist/_pkg/api/neutral/getApiStage.d.ts +8 -0
- package/dist/_pkg/api/neutral/index.d.ts +6 -0
- package/dist/_pkg/api/neutral/index.mjs +78 -0
- package/dist/_pkg/api/neutral/model.d.ts +3 -0
- package/dist/_pkg/api/neutral/model.mjs +1 -0
- package/dist/_pkg/array/neutral/containsAll.d.ts +8 -0
- package/dist/_pkg/array/neutral/distinct.d.ts +6 -0
- package/dist/_pkg/array/neutral/filterAs.d.ts +8 -0
- package/dist/_pkg/array/neutral/filterAsync.d.ts +9 -0
- package/dist/_pkg/array/neutral/findAs.d.ts +15 -0
- package/dist/_pkg/array/neutral/flatten.d.ts +8 -0
- package/dist/_pkg/array/neutral/index.d.ts +8 -0
- package/dist/_pkg/array/neutral/index.mjs +80 -0
- package/dist/_pkg/array/neutral/uniq.d.ts +14 -0
- package/dist/_pkg/arraybuffer/neutral/equalArrayBuffers.d.ts +8 -0
- package/dist/_pkg/arraybuffer/neutral/index.d.ts +5 -0
- package/dist/_pkg/arraybuffer/neutral/index.mjs +74 -0
- package/dist/_pkg/arraybuffer/neutral/isArrayBuffer.d.ts +7 -0
- package/dist/_pkg/arraybuffer/neutral/toArrayBuffer.d.ts +11 -0
- package/dist/_pkg/arraybuffer/neutral/toUint8Array.d.ts +11 -0
- package/dist/_pkg/assert/neutral/assertDefinedEx.d.ts +41 -0
- package/dist/_pkg/assert/neutral/assertEx.d.ts +41 -0
- package/dist/_pkg/assert/neutral/index.d.ts +4 -0
- package/dist/_pkg/assert/neutral/index.mjs +30 -0
- package/dist/_pkg/assert/neutral/model.d.ts +2 -0
- package/dist/_pkg/assert/neutral/model.mjs +1 -0
- package/dist/_pkg/assert/neutral/types.d.ts +36 -0
- package/dist/_pkg/base/neutral/Base.d.ts +53 -0
- package/dist/_pkg/base/neutral/UniqueBase.d.ts +10 -0
- package/dist/_pkg/base/neutral/globallyUnique.d.ts +21 -0
- package/dist/_pkg/base/neutral/index.d.ts +4 -0
- package/dist/_pkg/base/neutral/index.mjs +164 -0
- package/dist/_pkg/base/neutral/model.d.ts +2 -0
- package/dist/_pkg/base/neutral/model.mjs +1 -0
- package/dist/_pkg/creatable/neutral/AbstractCreatable.d.ts +123 -0
- package/dist/_pkg/creatable/neutral/Creatable.d.ts +49 -0
- package/dist/_pkg/creatable/neutral/Factory.d.ts +28 -0
- package/dist/_pkg/creatable/neutral/index.d.ts +5 -0
- package/dist/_pkg/creatable/neutral/index.mjs +396 -0
- package/dist/_pkg/creatable/neutral/lib/getFunctionName.d.ts +7 -0
- package/dist/_pkg/creatable/neutral/lib/getRootFunction.d.ts +8 -0
- package/dist/_pkg/creatable/neutral/lib/index.d.ts +3 -0
- package/dist/_pkg/creatable/neutral/model/CreatableInstance.d.ts +16 -0
- package/dist/_pkg/creatable/neutral/model/CreatableParams.d.ts +16 -0
- package/dist/_pkg/creatable/neutral/model/CreatableStatusReporter.d.ts +15 -0
- package/dist/_pkg/creatable/neutral/model/Labels.d.ts +24 -0
- package/dist/_pkg/creatable/neutral/model/index.d.ts +5 -0
- package/dist/_pkg/creatable/neutral/model.d.ts +3 -0
- package/dist/_pkg/creatable/neutral/model.mjs +1 -0
- package/dist/_pkg/decimal-precision/neutral/fromFixedPoint.d.ts +8 -0
- package/dist/_pkg/decimal-precision/neutral/index.d.ts +4 -0
- package/dist/_pkg/decimal-precision/neutral/index.mjs +39 -0
- package/dist/_pkg/decimal-precision/neutral/toDecimalPrecision.d.ts +8 -0
- package/dist/_pkg/decimal-precision/neutral/toFixedPoint.d.ts +8 -0
- package/dist/_pkg/delay/neutral/delay.d.ts +7 -0
- package/dist/_pkg/delay/neutral/index.d.ts +2 -0
- package/dist/_pkg/delay/neutral/index.mjs +9 -0
- package/dist/_pkg/ellipsize/neutral/index.d.ts +8 -0
- package/dist/_pkg/ellipsize/neutral/index.mjs +10 -0
- package/dist/_pkg/enum/neutral/Enum.d.ts +88 -0
- package/dist/_pkg/enum/neutral/index.d.ts +2 -0
- package/dist/_pkg/enum/neutral/index.mjs +8 -0
- package/dist/_pkg/enum/neutral/model.d.ts +2 -0
- package/dist/_pkg/enum/neutral/model.mjs +1 -0
- package/dist/_pkg/error/neutral/assert.d.ts +12 -0
- package/dist/_pkg/error/neutral/handleError.d.ts +15 -0
- package/dist/_pkg/error/neutral/index.d.ts +3 -0
- package/dist/_pkg/error/neutral/index.mjs +32 -0
- package/dist/_pkg/error/neutral/model.d.ts +2 -0
- package/dist/_pkg/error/neutral/model.mjs +1 -0
- package/dist/_pkg/events/neutral/BaseEmitter.d.ts +74 -0
- package/dist/_pkg/events/neutral/Events/Events.d.ts +132 -0
- package/dist/_pkg/events/neutral/Events/index.d.ts +2 -0
- package/dist/_pkg/events/neutral/index.d.ts +4 -0
- package/dist/_pkg/events/neutral/index.mjs +415 -0
- package/dist/_pkg/events/neutral/model/Event.d.ts +21 -0
- package/dist/_pkg/events/neutral/model/EventEmitter.d.ts +25 -0
- package/dist/_pkg/events/neutral/model/index.d.ts +3 -0
- package/dist/_pkg/events/neutral/model.d.ts +3 -0
- package/dist/_pkg/events/neutral/model.mjs +1 -0
- package/dist/_pkg/exists/neutral/index.d.ts +10 -0
- package/dist/_pkg/exists/neutral/index.mjs +8 -0
- package/dist/_pkg/fetch/neutral/FetchClient.d.ts +46 -0
- package/dist/_pkg/fetch/neutral/FetchError.d.ts +80 -0
- package/dist/_pkg/fetch/neutral/FetchJsonClient.d.ts +19 -0
- package/dist/_pkg/fetch/neutral/fetchCompress.d.ts +12 -0
- package/dist/_pkg/fetch/neutral/fetchJson.d.ts +7 -0
- package/dist/_pkg/fetch/neutral/index.d.ts +11 -0
- package/dist/_pkg/fetch/neutral/index.mjs +365 -0
- package/dist/_pkg/fetch/neutral/methods.d.ts +12 -0
- package/dist/_pkg/fetch/neutral/model.d.ts +5 -0
- package/dist/_pkg/fetch/neutral/model.mjs +1 -0
- package/dist/_pkg/fetch/neutral/parseJson.d.ts +16 -0
- package/dist/_pkg/fetch/neutral/types.d.ts +12 -0
- package/dist/_pkg/forget/neutral/ForgetConfig.d.ts +21 -0
- package/dist/_pkg/forget/neutral/ForgetNodeConfig.d.ts +13 -0
- package/dist/_pkg/forget/neutral/ForgetPromise.d.ts +49 -0
- package/dist/_pkg/forget/neutral/ForgetPromiseNode.d.ts +15 -0
- package/dist/_pkg/forget/neutral/forget.d.ts +10 -0
- package/dist/_pkg/forget/neutral/forgetNode.d.ts +9 -0
- package/dist/_pkg/forget/neutral/index.d.ts +2 -0
- package/dist/_pkg/forget/neutral/index.mjs +162 -0
- package/dist/_pkg/forget/neutral/model.d.ts +3 -0
- package/dist/_pkg/forget/neutral/model.mjs +1 -0
- package/dist/_pkg/forget/neutral/neutral/index.d.ts +4 -0
- package/dist/_pkg/forget/neutral/node/index.d.ts +4 -0
- package/dist/_pkg/function-name/neutral/functionName.d.ts +7 -0
- package/dist/_pkg/function-name/neutral/index.d.ts +2 -0
- package/dist/_pkg/function-name/neutral/index.mjs +27 -0
- package/dist/_pkg/hex/neutral/HexRegEx.d.ts +19 -0
- package/dist/_pkg/hex/neutral/address/AddressTransformZod.d.ts +10 -0
- package/dist/_pkg/hex/neutral/address/AddressValidationZod.d.ts +10 -0
- package/dist/_pkg/hex/neutral/address/address.d.ts +18 -0
- package/dist/_pkg/hex/neutral/address/as.d.ts +13 -0
- package/dist/_pkg/hex/neutral/address/index.d.ts +7 -0
- package/dist/_pkg/hex/neutral/address/is.d.ts +12 -0
- package/dist/_pkg/hex/neutral/address/to.d.ts +12 -0
- package/dist/_pkg/hex/neutral/ethAddress.d.ts +45 -0
- package/dist/_pkg/hex/neutral/hash/as.d.ts +11 -0
- package/dist/_pkg/hex/neutral/hash/hash.d.ts +28 -0
- package/dist/_pkg/hex/neutral/hash/index.d.ts +5 -0
- package/dist/_pkg/hex/neutral/hash/is.d.ts +9 -0
- package/dist/_pkg/hex/neutral/hash/zod.d.ts +6 -0
- package/dist/_pkg/hex/neutral/hex/as.d.ts +11 -0
- package/dist/_pkg/hex/neutral/hex/from/from.d.ts +8 -0
- package/dist/_pkg/hex/neutral/hex/from/fromArrayBuffer.d.ts +8 -0
- package/dist/_pkg/hex/neutral/hex/from/fromBigInt.d.ts +8 -0
- package/dist/_pkg/hex/neutral/hex/from/fromHexString.d.ts +9 -0
- package/dist/_pkg/hex/neutral/hex/from/fromNumber.d.ts +9 -0
- package/dist/_pkg/hex/neutral/hex/from/index.d.ts +6 -0
- package/dist/_pkg/hex/neutral/hex/hex.d.ts +17 -0
- package/dist/_pkg/hex/neutral/hex/index.d.ts +9 -0
- package/dist/_pkg/hex/neutral/hex/is.d.ts +9 -0
- package/dist/_pkg/hex/neutral/hex/isHexZero.d.ts +7 -0
- package/dist/_pkg/hex/neutral/hex/legacy.d.ts +7 -0
- package/dist/_pkg/hex/neutral/hex/nibble.d.ts +13 -0
- package/dist/_pkg/hex/neutral/hex/to.d.ts +8 -0
- package/dist/_pkg/hex/neutral/hexToBigInt.d.ts +8 -0
- package/dist/_pkg/hex/neutral/index.d.ts +8 -0
- package/dist/_pkg/hex/neutral/index.mjs +381 -0
- package/dist/_pkg/hex/neutral/model.d.ts +3 -0
- package/dist/_pkg/hex/neutral/model.mjs +1 -0
- package/dist/_pkg/hex/neutral/zod.d.ts +6 -0
- package/dist/_pkg/logger/neutral/ConsoleLogger.d.ts +7 -0
- package/dist/_pkg/logger/neutral/IdLogger.d.ts +19 -0
- package/dist/_pkg/logger/neutral/LevelLogger.d.ts +47 -0
- package/dist/_pkg/logger/neutral/NoOpLogFunction.d.ts +3 -0
- package/dist/_pkg/logger/neutral/SilentLogger.d.ts +17 -0
- package/dist/_pkg/logger/neutral/getFunctionName.d.ts +7 -0
- package/dist/_pkg/logger/neutral/index.d.ts +7 -0
- package/dist/_pkg/logger/neutral/index.mjs +126 -0
- package/dist/_pkg/object/neutral/AsObjectFactory.d.ts +8 -0
- package/dist/_pkg/object/neutral/AsTypeFactory.d.ts +11 -0
- package/dist/_pkg/object/neutral/EmptyObject.d.ts +2 -0
- package/dist/_pkg/object/neutral/IsObjectFactory.d.ts +16 -0
- package/dist/_pkg/object/neutral/JsonObject.d.ts +49 -0
- package/dist/_pkg/object/neutral/ObjectWrapper.d.ts +9 -0
- package/dist/_pkg/object/neutral/OmitStartsWith.d.ts +18 -0
- package/dist/_pkg/object/neutral/Optional.d.ts +3 -0
- package/dist/_pkg/object/neutral/Override.d.ts +4 -0
- package/dist/_pkg/object/neutral/PartialRecord.d.ts +3 -0
- package/dist/_pkg/object/neutral/PickStartsWith.d.ts +9 -0
- package/dist/_pkg/object/neutral/Simplify.d.ts +5 -0
- package/dist/_pkg/object/neutral/StringKeyObject.d.ts +3 -0
- package/dist/_pkg/object/neutral/Validator.d.ts +13 -0
- package/dist/_pkg/object/neutral/WithAdditional.d.ts +4 -0
- package/dist/_pkg/object/neutral/asObject.d.ts +4 -0
- package/dist/_pkg/object/neutral/deepMerge.d.ts +49 -0
- package/dist/_pkg/object/neutral/index-deprecated.d.ts +2 -0
- package/dist/_pkg/object/neutral/index-un-deprecated.d.ts +22 -0
- package/dist/_pkg/object/neutral/index-un-deprecated.mjs +320 -0
- package/dist/_pkg/object/neutral/index.d.ts +3 -0
- package/dist/_pkg/object/neutral/index.mjs +435 -0
- package/dist/_pkg/object/neutral/isType.d.ts +4 -0
- package/dist/_pkg/object/neutral/model.d.ts +14 -0
- package/dist/_pkg/object/neutral/model.mjs +1 -0
- package/dist/_pkg/object/neutral/omitBy.d.ts +21 -0
- package/dist/_pkg/object/neutral/pickBy.d.ts +21 -0
- package/dist/_pkg/object/neutral/removeFields.d.ts +9 -0
- package/dist/_pkg/object/neutral/toSafeJson.d.ts +41 -0
- package/dist/_pkg/object-model/neutral/AnyObject.d.ts +8 -0
- package/dist/_pkg/object-model/neutral/AsTypeFactory.d.ts +12 -0
- package/dist/_pkg/object-model/neutral/AsTypeFunction.d.ts +14 -0
- package/dist/_pkg/object-model/neutral/Compare.d.ts +3 -0
- package/dist/_pkg/object-model/neutral/EmptyObject.d.ts +8 -0
- package/dist/_pkg/object-model/neutral/index.d.ts +6 -0
- package/dist/_pkg/object-model/neutral/index.mjs +1 -0
- package/dist/_pkg/object-model/neutral/model.d.ts +6 -0
- package/dist/_pkg/object-model/neutral/model.mjs +1 -0
- package/dist/_pkg/object-model/neutral/types.d.ts +25 -0
- package/dist/_pkg/platform/browser/browser/index.d.ts +9 -0
- package/dist/_pkg/platform/browser/index-browser.d.ts +2 -0
- package/dist/_pkg/platform/browser/index-browser.mjs +18 -0
- package/dist/_pkg/platform/browser/index-node.d.ts +2 -0
- package/dist/_pkg/platform/browser/node/index.d.ts +9 -0
- package/dist/_pkg/platform/node/browser/index.d.ts +9 -0
- package/dist/_pkg/platform/node/index-browser.d.ts +2 -0
- package/dist/_pkg/platform/node/index-node.d.ts +2 -0
- package/dist/_pkg/platform/node/index-node.mjs +18 -0
- package/dist/_pkg/platform/node/node/index.d.ts +9 -0
- package/dist/_pkg/profile/neutral/index.d.ts +2 -0
- package/dist/_pkg/profile/neutral/index.mjs +37 -0
- package/dist/_pkg/profile/neutral/model.d.ts +2 -0
- package/dist/_pkg/profile/neutral/model.mjs +1 -0
- package/dist/_pkg/profile/neutral/profiler.d.ts +17 -0
- package/dist/_pkg/promise/neutral/PromiseEx.d.ts +24 -0
- package/dist/_pkg/promise/neutral/fulfilled.d.ts +7 -0
- package/dist/_pkg/promise/neutral/fulfilledValues.d.ts +20 -0
- package/dist/_pkg/promise/neutral/index.d.ts +7 -0
- package/dist/_pkg/promise/neutral/index.mjs +57 -0
- package/dist/_pkg/promise/neutral/model.d.ts +3 -0
- package/dist/_pkg/promise/neutral/model.mjs +1 -0
- package/dist/_pkg/promise/neutral/rejected.d.ts +7 -0
- package/dist/_pkg/promise/neutral/toPromise.d.ts +8 -0
- package/dist/_pkg/promise/neutral/types.d.ts +23 -0
- package/dist/_pkg/retry/neutral/index.d.ts +2 -0
- package/dist/_pkg/retry/neutral/index.mjs +28 -0
- package/dist/_pkg/retry/neutral/model.d.ts +2 -0
- package/dist/_pkg/retry/neutral/model.mjs +1 -0
- package/dist/_pkg/retry/neutral/retry.d.ts +23 -0
- package/dist/_pkg/set/neutral/index.d.ts +2 -0
- package/dist/_pkg/set/neutral/index.mjs +20 -0
- package/dist/_pkg/set/neutral/lib/difference.d.ts +8 -0
- package/dist/_pkg/set/neutral/lib/index.d.ts +4 -0
- package/dist/_pkg/set/neutral/lib/intersection.d.ts +8 -0
- package/dist/_pkg/set/neutral/lib/union.d.ts +8 -0
- package/dist/_pkg/static-implements/neutral/index.d.ts +2 -0
- package/dist/_pkg/static-implements/neutral/index.mjs +10 -0
- package/dist/_pkg/static-implements/neutral/staticImplements.d.ts +7 -0
- package/dist/_pkg/storage/neutral/KeyValueStore.d.ts +34 -0
- package/dist/_pkg/storage/neutral/index.d.ts +2 -0
- package/dist/_pkg/storage/neutral/index.mjs +1 -0
- package/dist/_pkg/storage/neutral/model.d.ts +2 -0
- package/dist/_pkg/storage/neutral/model.mjs +1 -0
- package/dist/_pkg/telemetry/neutral/index.d.ts +3 -0
- package/dist/_pkg/telemetry/neutral/index.mjs +152 -0
- package/dist/_pkg/telemetry/neutral/model.d.ts +2 -0
- package/dist/_pkg/telemetry/neutral/model.mjs +1 -0
- package/dist/_pkg/telemetry/neutral/span.d.ts +51 -0
- package/dist/_pkg/telemetry/neutral/timeBudget.d.ts +12 -0
- package/dist/_pkg/telemetry-exporter/neutral/XyConsoleSpanExporter.d.ts +40 -0
- package/dist/_pkg/telemetry-exporter/neutral/index.d.ts +2 -0
- package/dist/_pkg/telemetry-exporter/neutral/index.mjs +88 -0
- package/dist/_pkg/timer/neutral/index.d.ts +2 -0
- package/dist/_pkg/timer/neutral/index.mjs +75 -0
- package/dist/_pkg/timer/neutral/setTimeoutEx.d.ts +37 -0
- package/dist/_pkg/typeof/neutral/Brand.d.ts +5 -0
- package/dist/_pkg/typeof/neutral/IdentityFunction.d.ts +3 -0
- package/dist/_pkg/typeof/neutral/ObjectTypeShape.d.ts +5 -0
- package/dist/_pkg/typeof/neutral/TypeOfTypes.d.ts +3 -0
- package/dist/_pkg/typeof/neutral/Typed.d.ts +41 -0
- package/dist/_pkg/typeof/neutral/ifDefined.d.ts +8 -0
- package/dist/_pkg/typeof/neutral/ifTypeOf.d.ts +11 -0
- package/dist/_pkg/typeof/neutral/index.d.ts +12 -0
- package/dist/_pkg/typeof/neutral/index.mjs +255 -0
- package/dist/_pkg/typeof/neutral/is.d.ts +116 -0
- package/dist/_pkg/typeof/neutral/isType.d.ts +9 -0
- package/dist/_pkg/typeof/neutral/model.d.ts +7 -0
- package/dist/_pkg/typeof/neutral/model.mjs +1 -0
- package/dist/_pkg/typeof/neutral/typeOf.d.ts +8 -0
- package/dist/_pkg/typeof/neutral/validateType.d.ts +10 -0
- package/dist/_pkg/url/browser/index-browser.d.ts +12 -0
- package/dist/_pkg/url/browser/index-browser.mjs +12 -0
- package/dist/_pkg/url/browser/index-neutral.d.ts +12 -0
- package/dist/_pkg/url/browser/index-node.d.ts +13 -0
- package/dist/_pkg/url/browser/lib/index.d.ts +2 -0
- package/dist/_pkg/url/browser/lib/isLocalhost.d.ts +7 -0
- package/dist/_pkg/url/neutral/index-browser.d.ts +12 -0
- package/dist/_pkg/url/neutral/index-neutral.d.ts +12 -0
- package/dist/_pkg/url/neutral/index-neutral.mjs +12 -0
- package/dist/_pkg/url/neutral/index-node.d.ts +13 -0
- package/dist/_pkg/url/neutral/lib/index.d.ts +2 -0
- package/dist/_pkg/url/neutral/lib/isLocalhost.d.ts +7 -0
- package/dist/_pkg/url/node/index-browser.d.ts +12 -0
- package/dist/_pkg/url/node/index-neutral.d.ts +12 -0
- package/dist/_pkg/url/node/index-node.d.ts +13 -0
- package/dist/_pkg/url/node/index-node.mjs +15 -0
- package/dist/_pkg/url/node/lib/index.d.ts +2 -0
- package/dist/_pkg/url/node/lib/isLocalhost.d.ts +7 -0
- package/dist/_pkg/zod/neutral/Config.d.ts +8 -0
- package/dist/_pkg/zod/neutral/index.d.ts +8 -0
- package/dist/_pkg/zod/neutral/index.mjs +127 -0
- package/dist/_pkg/zod/neutral/model.d.ts +2 -0
- package/dist/_pkg/zod/neutral/model.mjs +1 -0
- package/dist/_pkg/zod/neutral/zodAllFactory.d.ts +20 -0
- package/dist/_pkg/zod/neutral/zodAsAsyncFactory.d.ts +14 -0
- package/dist/_pkg/zod/neutral/zodAsFactory.d.ts +14 -0
- package/dist/_pkg/zod/neutral/zodIsFactory.d.ts +8 -0
- package/dist/_pkg/zod/neutral/zodToAsyncFactory.d.ts +14 -0
- package/dist/_pkg/zod/neutral/zodToFactory.d.ts +14 -0
- package/dist/browser/index.d.ts +32 -0
- package/dist/browser/index.mjs +32 -0
- package/dist/browser/platform.d.ts +1 -0
- package/dist/browser/platform.mjs +1 -0
- package/dist/browser/url.d.ts +1 -0
- package/dist/browser/url.mjs +1 -0
- package/dist/neutral/api.d.ts +1 -0
- package/dist/neutral/api.mjs +1 -0
- package/dist/neutral/api.model.d.ts +1 -0
- package/dist/neutral/api.model.mjs +1 -0
- package/dist/neutral/array.d.ts +1 -0
- package/dist/neutral/array.mjs +1 -0
- package/dist/neutral/arraybuffer.d.ts +1 -0
- package/dist/neutral/arraybuffer.mjs +1 -0
- package/dist/neutral/assert.d.ts +1 -0
- package/dist/neutral/assert.mjs +1 -0
- package/dist/neutral/assert.model.d.ts +1 -0
- package/dist/neutral/assert.model.mjs +1 -0
- package/dist/neutral/base.d.ts +1 -0
- package/dist/neutral/base.mjs +1 -0
- package/dist/neutral/base.model.d.ts +1 -0
- package/dist/neutral/base.model.mjs +1 -0
- package/dist/neutral/creatable.d.ts +1 -0
- package/dist/neutral/creatable.mjs +1 -0
- package/dist/neutral/creatable.model.d.ts +1 -0
- package/dist/neutral/creatable.model.mjs +1 -0
- package/dist/neutral/decimal-precision.d.ts +1 -0
- package/dist/neutral/decimal-precision.mjs +1 -0
- package/dist/neutral/delay.d.ts +1 -0
- package/dist/neutral/delay.mjs +1 -0
- package/dist/neutral/ellipsize.d.ts +1 -0
- package/dist/neutral/ellipsize.mjs +1 -0
- package/dist/neutral/enum.d.ts +1 -0
- package/dist/neutral/enum.mjs +1 -0
- package/dist/neutral/enum.model.d.ts +1 -0
- package/dist/neutral/enum.model.mjs +1 -0
- package/dist/neutral/error.d.ts +1 -0
- package/dist/neutral/error.mjs +1 -0
- package/dist/neutral/error.model.d.ts +1 -0
- package/dist/neutral/error.model.mjs +1 -0
- package/dist/neutral/events.d.ts +1 -0
- package/dist/neutral/events.mjs +1 -0
- package/dist/neutral/events.model.d.ts +1 -0
- package/dist/neutral/events.model.mjs +1 -0
- package/dist/neutral/exists.d.ts +1 -0
- package/dist/neutral/exists.mjs +1 -0
- package/dist/neutral/fetch.d.ts +1 -0
- package/dist/neutral/fetch.mjs +1 -0
- package/dist/neutral/fetch.model.d.ts +1 -0
- package/dist/neutral/fetch.model.mjs +1 -0
- package/dist/neutral/forget.d.ts +1 -0
- package/dist/neutral/forget.mjs +1 -0
- package/dist/neutral/forget.model.d.ts +1 -0
- package/dist/neutral/forget.model.mjs +1 -0
- package/dist/neutral/function-name.d.ts +1 -0
- package/dist/neutral/function-name.mjs +1 -0
- package/dist/neutral/hex.d.ts +1 -0
- package/dist/neutral/hex.mjs +1 -0
- package/dist/neutral/hex.model.d.ts +1 -0
- package/dist/neutral/hex.model.mjs +1 -0
- package/dist/neutral/logger.d.ts +1 -0
- package/dist/neutral/logger.mjs +1 -0
- package/dist/neutral/model.d.ts +18 -0
- package/dist/neutral/model.mjs +18 -0
- package/dist/neutral/object.d.ts +1 -0
- package/dist/neutral/object.mjs +1 -0
- package/dist/neutral/object.model.d.ts +1 -0
- package/dist/neutral/object.model.mjs +1 -0
- package/dist/neutral/profile.d.ts +1 -0
- package/dist/neutral/profile.mjs +1 -0
- package/dist/neutral/profile.model.d.ts +1 -0
- package/dist/neutral/profile.model.mjs +1 -0
- package/dist/neutral/promise.d.ts +1 -0
- package/dist/neutral/promise.mjs +1 -0
- package/dist/neutral/promise.model.d.ts +1 -0
- package/dist/neutral/promise.model.mjs +1 -0
- package/dist/neutral/retry.d.ts +1 -0
- package/dist/neutral/retry.mjs +1 -0
- package/dist/neutral/retry.model.d.ts +1 -0
- package/dist/neutral/retry.model.mjs +1 -0
- package/dist/neutral/set.d.ts +1 -0
- package/dist/neutral/set.mjs +1 -0
- package/dist/neutral/static-implements.d.ts +1 -0
- package/dist/neutral/static-implements.mjs +1 -0
- package/dist/neutral/storage.d.ts +1 -0
- package/dist/neutral/storage.mjs +1 -0
- package/dist/neutral/storage.model.d.ts +1 -0
- package/dist/neutral/storage.model.mjs +1 -0
- package/dist/neutral/telemetry-exporter.d.ts +1 -0
- package/dist/neutral/telemetry-exporter.mjs +1 -0
- package/dist/neutral/telemetry.d.ts +1 -0
- package/dist/neutral/telemetry.mjs +1 -0
- package/dist/neutral/telemetry.model.d.ts +1 -0
- package/dist/neutral/telemetry.model.mjs +1 -0
- package/dist/neutral/timer.d.ts +1 -0
- package/dist/neutral/timer.mjs +1 -0
- package/dist/neutral/typeof.d.ts +1 -0
- package/dist/neutral/typeof.mjs +1 -0
- package/dist/neutral/typeof.model.d.ts +1 -0
- package/dist/neutral/typeof.model.mjs +1 -0
- package/dist/neutral/url.d.ts +1 -0
- package/dist/neutral/url.mjs +1 -0
- package/dist/neutral/zod.d.ts +1 -0
- package/dist/neutral/zod.mjs +1 -0
- package/dist/neutral/zod.model.d.ts +1 -0
- package/dist/neutral/zod.model.mjs +1 -0
- package/dist/node/index.d.ts +32 -0
- package/dist/node/index.mjs +32 -0
- package/dist/node/platform.d.ts +1 -0
- package/dist/node/platform.mjs +1 -0
- package/dist/node/url.d.ts +1 -0
- package/dist/node/url.mjs +1 -0
- package/package.json +339 -0
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
// src/typeOf.ts
|
|
2
|
+
var typeOf = (item) => {
|
|
3
|
+
return Array.isArray(item) ? "array" : typeof item;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
// src/ifDefined.ts
|
|
7
|
+
var ifDefined = (value, func) => {
|
|
8
|
+
switch (typeOf(value)) {
|
|
9
|
+
case "undefined":
|
|
10
|
+
case "null": {
|
|
11
|
+
break;
|
|
12
|
+
}
|
|
13
|
+
default: {
|
|
14
|
+
func(value);
|
|
15
|
+
return value;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// src/ifTypeOf.ts
|
|
21
|
+
var ifTypeOf = (typeName, value, trueFunc, isFunc) => {
|
|
22
|
+
switch (typeOf(value)) {
|
|
23
|
+
case typeName: {
|
|
24
|
+
return !isFunc || isFunc(value) ? trueFunc(value) : void 0;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// src/is.ts
|
|
30
|
+
function isUndefined(value) {
|
|
31
|
+
return value === void 0;
|
|
32
|
+
}
|
|
33
|
+
function isDefined(value) {
|
|
34
|
+
return !isUndefined(value);
|
|
35
|
+
}
|
|
36
|
+
function isNull(value) {
|
|
37
|
+
return value === null;
|
|
38
|
+
}
|
|
39
|
+
function isDefinedNotNull(value) {
|
|
40
|
+
return !isUndefined(value) && !isNull(value);
|
|
41
|
+
}
|
|
42
|
+
function isUndefinedOrNull(value) {
|
|
43
|
+
return isUndefined(value) || isNull(value);
|
|
44
|
+
}
|
|
45
|
+
function isBigInt(value) {
|
|
46
|
+
return typeof value === "bigint";
|
|
47
|
+
}
|
|
48
|
+
function isString(value) {
|
|
49
|
+
return typeof value === "string";
|
|
50
|
+
}
|
|
51
|
+
function isNumber(value) {
|
|
52
|
+
return typeof value === "number";
|
|
53
|
+
}
|
|
54
|
+
function isObject(value) {
|
|
55
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
56
|
+
}
|
|
57
|
+
function isArray(value) {
|
|
58
|
+
return Array.isArray(value);
|
|
59
|
+
}
|
|
60
|
+
function isFunction(value) {
|
|
61
|
+
return typeof value === "function";
|
|
62
|
+
}
|
|
63
|
+
function isSymbol(value) {
|
|
64
|
+
return typeof value === "symbol";
|
|
65
|
+
}
|
|
66
|
+
function isEmptyObject(value) {
|
|
67
|
+
return isObject(value) && Object.keys(value).length === 0;
|
|
68
|
+
}
|
|
69
|
+
function isEmptyString(value) {
|
|
70
|
+
return isString(value) && value.length === 0;
|
|
71
|
+
}
|
|
72
|
+
function isEmptyArray(value) {
|
|
73
|
+
return isArray(value) && value.length === 0;
|
|
74
|
+
}
|
|
75
|
+
function isPopulatedArray(value) {
|
|
76
|
+
return isArray(value) && value.length > 0;
|
|
77
|
+
}
|
|
78
|
+
function isEmpty(value) {
|
|
79
|
+
return isEmptyString(value) || isEmptyArray(value) || isEmptyObject(value);
|
|
80
|
+
}
|
|
81
|
+
function isFalsy(value) {
|
|
82
|
+
return !value;
|
|
83
|
+
}
|
|
84
|
+
function isTruthy(value) {
|
|
85
|
+
return !!value;
|
|
86
|
+
}
|
|
87
|
+
function isBoolean(value) {
|
|
88
|
+
return typeof value === "boolean";
|
|
89
|
+
}
|
|
90
|
+
function isDateString(value) {
|
|
91
|
+
return isString(value) && !Number.isNaN(Date.parse(value));
|
|
92
|
+
}
|
|
93
|
+
function isDate(value) {
|
|
94
|
+
return value instanceof Date;
|
|
95
|
+
}
|
|
96
|
+
function isRegExp(value) {
|
|
97
|
+
return value instanceof RegExp;
|
|
98
|
+
}
|
|
99
|
+
function isError(value) {
|
|
100
|
+
return value instanceof Error;
|
|
101
|
+
}
|
|
102
|
+
function isPromise(value) {
|
|
103
|
+
return value instanceof Promise;
|
|
104
|
+
}
|
|
105
|
+
function isPromiseLike(value) {
|
|
106
|
+
return typeof value === "object" && value !== null && typeof value.then === "function";
|
|
107
|
+
}
|
|
108
|
+
function isMap(value) {
|
|
109
|
+
return value instanceof Map;
|
|
110
|
+
}
|
|
111
|
+
function isArrayBufferView(value) {
|
|
112
|
+
return ArrayBuffer.isView(value);
|
|
113
|
+
}
|
|
114
|
+
function isSet(value) {
|
|
115
|
+
return value instanceof Set;
|
|
116
|
+
}
|
|
117
|
+
function isWeakMap(value) {
|
|
118
|
+
return value instanceof WeakMap;
|
|
119
|
+
}
|
|
120
|
+
function isWeakSet(value) {
|
|
121
|
+
return value instanceof WeakSet;
|
|
122
|
+
}
|
|
123
|
+
function isDataView(value) {
|
|
124
|
+
return value instanceof DataView;
|
|
125
|
+
}
|
|
126
|
+
function isBlob(value) {
|
|
127
|
+
return typeof Blob !== "undefined" && value instanceof Blob;
|
|
128
|
+
}
|
|
129
|
+
function isFile(value) {
|
|
130
|
+
return typeof File !== "undefined" && value instanceof File;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// src/isType.ts
|
|
134
|
+
var isType = (value, expectedType) => {
|
|
135
|
+
const typeofValue = typeof value;
|
|
136
|
+
switch (expectedType) {
|
|
137
|
+
case "array": {
|
|
138
|
+
return Array.isArray(value);
|
|
139
|
+
}
|
|
140
|
+
case "null": {
|
|
141
|
+
return value === null;
|
|
142
|
+
}
|
|
143
|
+
case "undefined": {
|
|
144
|
+
return value === void 0;
|
|
145
|
+
}
|
|
146
|
+
case "object": {
|
|
147
|
+
if (value === null) {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
return typeofValue === "object" && !Array.isArray(value);
|
|
151
|
+
}
|
|
152
|
+
default: {
|
|
153
|
+
return typeofValue === expectedType;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
// src/Typed.ts
|
|
159
|
+
var isTypedKey = (value) => {
|
|
160
|
+
switch (typeof value) {
|
|
161
|
+
case "string":
|
|
162
|
+
case "bigint":
|
|
163
|
+
case "number":
|
|
164
|
+
case "symbol": {
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
167
|
+
default: {
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
var isTypedValue = (value) => {
|
|
173
|
+
switch (typeof value) {
|
|
174
|
+
case "string":
|
|
175
|
+
case "number":
|
|
176
|
+
case "boolean": {
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
default: {
|
|
180
|
+
return value === null || isTypedObject(value) || isTypedArray(value);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
var isTypedArray = (value) => {
|
|
185
|
+
return Array.isArray(value) && value.every((item) => isTypedValue(item));
|
|
186
|
+
};
|
|
187
|
+
var isValidTypedFieldPair = (pair) => {
|
|
188
|
+
const [key, value] = pair;
|
|
189
|
+
return isTypedKey(key) && isTypedValue(value);
|
|
190
|
+
};
|
|
191
|
+
var isTypedObject = (value) => {
|
|
192
|
+
return isType(value, "object") && Object.entries(value).every((item) => isValidTypedFieldPair(item));
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
// src/validateType.ts
|
|
196
|
+
var validateType = (typeName, value, optional = false) => {
|
|
197
|
+
switch (typeOf(value)) {
|
|
198
|
+
case typeName: {
|
|
199
|
+
return [value, []];
|
|
200
|
+
}
|
|
201
|
+
default: {
|
|
202
|
+
if (optional && typeOf(value) === "undefined") {
|
|
203
|
+
return [value, []];
|
|
204
|
+
}
|
|
205
|
+
return [void 0, [new Error(`value type is not '${typeName}:${typeof value}'`)]];
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
export {
|
|
210
|
+
ifDefined,
|
|
211
|
+
ifTypeOf,
|
|
212
|
+
isArray,
|
|
213
|
+
isArrayBufferView,
|
|
214
|
+
isBigInt,
|
|
215
|
+
isBlob,
|
|
216
|
+
isBoolean,
|
|
217
|
+
isDataView,
|
|
218
|
+
isDate,
|
|
219
|
+
isDateString,
|
|
220
|
+
isDefined,
|
|
221
|
+
isDefinedNotNull,
|
|
222
|
+
isEmpty,
|
|
223
|
+
isEmptyArray,
|
|
224
|
+
isEmptyObject,
|
|
225
|
+
isEmptyString,
|
|
226
|
+
isError,
|
|
227
|
+
isFalsy,
|
|
228
|
+
isFile,
|
|
229
|
+
isFunction,
|
|
230
|
+
isMap,
|
|
231
|
+
isNull,
|
|
232
|
+
isNumber,
|
|
233
|
+
isObject,
|
|
234
|
+
isPopulatedArray,
|
|
235
|
+
isPromise,
|
|
236
|
+
isPromiseLike,
|
|
237
|
+
isRegExp,
|
|
238
|
+
isSet,
|
|
239
|
+
isString,
|
|
240
|
+
isSymbol,
|
|
241
|
+
isTruthy,
|
|
242
|
+
isType,
|
|
243
|
+
isTypedArray,
|
|
244
|
+
isTypedKey,
|
|
245
|
+
isTypedObject,
|
|
246
|
+
isTypedValue,
|
|
247
|
+
isUndefined,
|
|
248
|
+
isUndefinedOrNull,
|
|
249
|
+
isValidTypedFieldPair,
|
|
250
|
+
isWeakMap,
|
|
251
|
+
isWeakSet,
|
|
252
|
+
typeOf,
|
|
253
|
+
validateType
|
|
254
|
+
};
|
|
255
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/** A function type that accepts any arguments and returns unknown. */
|
|
2
|
+
export type AnyFunction = (...args: unknown[]) => unknown;
|
|
3
|
+
/** A union of valid object key types. */
|
|
4
|
+
export type RecordKey = string | number | symbol;
|
|
5
|
+
/** Type guard that checks whether a value is undefined. */
|
|
6
|
+
export declare function isUndefined(value: unknown): value is undefined;
|
|
7
|
+
export declare function isUndefined<T>(value: T): value is Extract<T, undefined>;
|
|
8
|
+
/** Type guard that checks whether a value is not undefined. */
|
|
9
|
+
export declare function isDefined<T>(value: T): value is Exclude<T, undefined>;
|
|
10
|
+
/** Type guard that checks whether a value is null. */
|
|
11
|
+
export declare function isNull(value: unknown): value is null;
|
|
12
|
+
export declare function isNull<T>(value: T): value is Extract<T, null>;
|
|
13
|
+
/** Type guard that checks whether a value is neither undefined nor null. */
|
|
14
|
+
export declare function isDefinedNotNull<T>(value: T): value is Exclude<T, undefined | null>;
|
|
15
|
+
/** Type guard that checks whether a value is undefined or null. */
|
|
16
|
+
export declare function isUndefinedOrNull(value: unknown): value is undefined | null;
|
|
17
|
+
export declare function isUndefinedOrNull<T>(value: T): value is Extract<T, undefined | null>;
|
|
18
|
+
/** Type guard that checks whether a value is a bigint. */
|
|
19
|
+
export declare function isBigInt(value: unknown): value is bigint;
|
|
20
|
+
export declare function isBigInt<T extends bigint>(value: T): value is Extract<T, bigint>;
|
|
21
|
+
/** Type guard that checks whether a value is a string. */
|
|
22
|
+
export declare function isString(value: unknown): value is string;
|
|
23
|
+
export declare function isString<T extends string>(value: T): value is Extract<T, string>;
|
|
24
|
+
/** Type guard that checks whether a value is a number. */
|
|
25
|
+
export declare function isNumber(value: unknown): value is number;
|
|
26
|
+
export declare function isNumber<T extends number>(value: T): value is Extract<T, number>;
|
|
27
|
+
/** Type guard that checks whether a value is a plain object (not null and not an array). */
|
|
28
|
+
export declare function isObject(value: unknown): value is object;
|
|
29
|
+
export declare function isObject<T extends object>(value: T): value is Extract<T, object>;
|
|
30
|
+
/** Type guard that checks whether a value is an array. */
|
|
31
|
+
export declare function isArray(value: unknown): value is readonly unknown[];
|
|
32
|
+
export declare function isArray<T>(value: T): value is Extract<T, readonly unknown[]>;
|
|
33
|
+
/** Type guard that checks whether a value is a function. */
|
|
34
|
+
export declare function isFunction(value: unknown): value is AnyFunction;
|
|
35
|
+
export declare function isFunction<T extends AnyFunction>(value: T): value is Extract<T, AnyFunction>;
|
|
36
|
+
/** Type guard that checks whether a value is a symbol. */
|
|
37
|
+
export declare function isSymbol(value: unknown): value is symbol;
|
|
38
|
+
export declare function isSymbol<T extends symbol>(value: T): value is Extract<T, symbol>;
|
|
39
|
+
/** Type guard that checks whether a value is an object with no own keys. */
|
|
40
|
+
export declare function isEmptyObject(value: unknown): value is {};
|
|
41
|
+
export declare function isEmptyObject<K extends RecordKey, V, T extends Record<K, V>>(value: T): value is Extract<T, Record<K, never>>;
|
|
42
|
+
/** Type guard that checks whether a value is an empty string. */
|
|
43
|
+
export declare function isEmptyString(value: unknown): value is '';
|
|
44
|
+
export declare function isEmptyString<T extends string>(value: T): value is Extract<T, ''>;
|
|
45
|
+
/** Type guard that checks whether a value is an empty array. */
|
|
46
|
+
export declare function isEmptyArray(value: unknown): value is [];
|
|
47
|
+
export declare function isEmptyArray<T extends unknown[]>(value: T): value is Extract<T, unknown[]>;
|
|
48
|
+
/** Type guard that checks whether a value is a non-empty array. */
|
|
49
|
+
export declare function isPopulatedArray(value: unknown): value is readonly unknown[];
|
|
50
|
+
export declare function isPopulatedArray<T extends unknown[]>(value: T): value is Extract<T, readonly unknown[]>;
|
|
51
|
+
/** Type guard that checks whether a value is empty (empty string, empty array, or empty object). */
|
|
52
|
+
export declare function isEmpty<T>(value: unknown): value is T;
|
|
53
|
+
export declare function isEmpty<K extends RecordKey, V, T extends Record<K, V>>(value: T): value is Extract<T, Record<K, never>>;
|
|
54
|
+
export declare function isEmpty<T extends unknown[]>(value: T): value is Extract<T, never[]>;
|
|
55
|
+
/** Type guard that checks whether a value is falsy (0, null, undefined, false, '', or 0n). */
|
|
56
|
+
export declare function isFalsy<T>(value: T): value is Extract<T, 0 | null | undefined | false | '' | 0n>;
|
|
57
|
+
export declare function isFalsy<T extends boolean>(value: T): value is Extract<T, false>;
|
|
58
|
+
export declare function isFalsy<T extends number>(value: T): value is Extract<T, 0>;
|
|
59
|
+
export declare function isFalsy<T extends bigint>(value: T): value is Extract<T, 0n>;
|
|
60
|
+
export declare function isFalsy<T extends null>(value: T): value is Extract<T, null>;
|
|
61
|
+
export declare function isFalsy<T extends undefined>(value: T): value is Extract<T, undefined>;
|
|
62
|
+
export declare function isFalsy<T extends string>(value: T): value is Extract<T, ''>;
|
|
63
|
+
/** Type guard that checks whether a value is truthy (not 0, null, undefined, false, '', or 0n). */
|
|
64
|
+
export declare function isTruthy<T>(value: T): value is Exclude<T, 0 | null | undefined | false | '' | 0n>;
|
|
65
|
+
export declare function isTruthy<T extends boolean>(value: T): value is Extract<T, true>;
|
|
66
|
+
export declare function isTruthy<T extends number>(value: T): value is Extract<T, number>;
|
|
67
|
+
export declare function isTruthy<T extends bigint>(value: T): value is Extract<T, bigint>;
|
|
68
|
+
export declare function isTruthy<T extends null>(value: T): value is Extract<T, null>;
|
|
69
|
+
export declare function isTruthy<T extends undefined>(value: T): value is Extract<T, undefined>;
|
|
70
|
+
export declare function isTruthy<T extends string>(value: T): value is Extract<T, string>;
|
|
71
|
+
/** Type guard that checks whether a value is a boolean. */
|
|
72
|
+
export declare function isBoolean(value: unknown): value is boolean;
|
|
73
|
+
export declare function isBoolean<T extends boolean>(value: T): value is Extract<T, boolean>;
|
|
74
|
+
/** Type guard that checks whether a value is a string that can be parsed as a valid date. */
|
|
75
|
+
export declare function isDateString(value: unknown): value is string;
|
|
76
|
+
export declare function isDateString<T>(value: T): value is Extract<T, string>;
|
|
77
|
+
/** Type guard that checks whether a value is a Date instance. */
|
|
78
|
+
export declare function isDate(value: unknown): value is Date;
|
|
79
|
+
export declare function isDate<T>(value: T): value is Extract<T, Date>;
|
|
80
|
+
/** Type guard that checks whether a value is a RegExp instance. */
|
|
81
|
+
export declare function isRegExp(value: unknown): value is RegExp;
|
|
82
|
+
export declare function isRegExp<T extends RegExp>(value: T): value is Extract<T, RegExp>;
|
|
83
|
+
/** Type guard that checks whether a value is an Error instance. */
|
|
84
|
+
export declare function isError(value: unknown): value is Error;
|
|
85
|
+
export declare function isError<T>(value: T): value is Extract<T, Error>;
|
|
86
|
+
/** Type guard that checks whether a value is a Promise instance. */
|
|
87
|
+
export declare function isPromise(value: unknown): value is Promise<unknown>;
|
|
88
|
+
export declare function isPromise<T>(value: T): value is Extract<T, Promise<unknown>>;
|
|
89
|
+
/** Type guard that checks whether a value is promise-like (has a `then` method). */
|
|
90
|
+
export declare function isPromiseLike(value: unknown): value is Promise<unknown>;
|
|
91
|
+
export declare function isPromiseLike<T>(value: T): value is Extract<T, Promise<unknown>>;
|
|
92
|
+
/** Type guard that checks whether a value is a Map instance. */
|
|
93
|
+
export declare function isMap(value: unknown): value is Map<unknown, unknown>;
|
|
94
|
+
export declare function isMap<K, V, T extends Map<K, V>>(value: T): value is Extract<T, Map<K, V>>;
|
|
95
|
+
/** Type guard that checks whether a value is an ArrayBufferView (e.g., TypedArray or DataView). */
|
|
96
|
+
export declare function isArrayBufferView(value: unknown): value is ArrayBufferView;
|
|
97
|
+
export declare function isArrayBufferView<T extends ArrayBufferView>(value: T): value is Extract<T, ArrayBufferView>;
|
|
98
|
+
/** Type guard that checks whether a value is a Set instance. */
|
|
99
|
+
export declare function isSet(value: unknown): value is Set<unknown>;
|
|
100
|
+
export declare function isSet<T extends Set<unknown>>(value: T): value is Extract<T, Set<unknown>>;
|
|
101
|
+
/** Type guard that checks whether a value is a WeakMap instance. */
|
|
102
|
+
export declare function isWeakMap(value: unknown): value is WeakMap<WeakKey, unknown>;
|
|
103
|
+
export declare function isWeakMap<K extends WeakKey, V, T extends WeakMap<K, V>>(value: T): value is Extract<T, WeakMap<K, V>>;
|
|
104
|
+
/** Type guard that checks whether a value is a WeakSet instance. */
|
|
105
|
+
export declare function isWeakSet(value: unknown): value is WeakSet<WeakKey>;
|
|
106
|
+
export declare function isWeakSet<K extends WeakKey, T extends WeakSet<K>>(value: T): value is Extract<T, WeakSet<K>>;
|
|
107
|
+
/** Type guard that checks whether a value is a DataView instance. */
|
|
108
|
+
export declare function isDataView(value: unknown): value is DataView;
|
|
109
|
+
export declare function isDataView<T>(value: T): value is Extract<T, DataView>;
|
|
110
|
+
/** Type guard that checks whether a value is a Blob instance. */
|
|
111
|
+
export declare function isBlob(value: unknown): value is Blob;
|
|
112
|
+
export declare function isBlob<T extends Blob>(value: T): value is Extract<T, Blob>;
|
|
113
|
+
/** Type guard that checks whether a value is a File instance. */
|
|
114
|
+
export declare function isFile(value: unknown): value is File;
|
|
115
|
+
export declare function isFile<T extends File>(value: T): value is Extract<T, File>;
|
|
116
|
+
//# sourceMappingURL=is.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FieldType } from './ObjectTypeShape.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Checks whether a value matches the expected field type, with correct handling for arrays and nulls.
|
|
4
|
+
* @param value - The value to check.
|
|
5
|
+
* @param expectedType - The expected type string.
|
|
6
|
+
* @returns True if the value matches the expected type.
|
|
7
|
+
*/
|
|
8
|
+
export declare const isType: (value: unknown, expectedType: FieldType) => boolean;
|
|
9
|
+
//# sourceMappingURL=isType.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type * from './Brand.ts';
|
|
2
|
+
export type * from './IdentityFunction.ts';
|
|
3
|
+
export type { AnyFunction, RecordKey, } from './is.ts';
|
|
4
|
+
export type * from './ObjectTypeShape.ts';
|
|
5
|
+
export type { TypedArray, TypedKey, TypedObject, TypedValue, } from './Typed.ts';
|
|
6
|
+
export type * from './TypeOfTypes.ts';
|
|
7
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=model.mjs.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TypeOfTypes } from './TypeOfTypes.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Extended typeof that distinguishes arrays from objects (unlike native `typeof`).
|
|
4
|
+
* @param item - The value to check.
|
|
5
|
+
* @returns The type of the item as a TypeOfTypes string.
|
|
6
|
+
*/
|
|
7
|
+
export declare const typeOf: <T>(item: T) => TypeOfTypes;
|
|
8
|
+
//# sourceMappingURL=typeOf.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TypeOfTypes } from './TypeOfTypes.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Validates that a value matches the expected type, returning the value and any errors.
|
|
4
|
+
* @param typeName - The expected type name.
|
|
5
|
+
* @param value - The value to validate.
|
|
6
|
+
* @param optional - If true, undefined values are accepted without error.
|
|
7
|
+
* @returns A tuple of [value or undefined, array of errors].
|
|
8
|
+
*/
|
|
9
|
+
export declare const validateType: <T>(typeName: TypeOfTypes, value: T, optional?: boolean) => [T | undefined, Error[]];
|
|
10
|
+
//# sourceMappingURL=validateType.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Browser-specific URL class, aliased from the global `URL`. */
|
|
2
|
+
declare const BrowserUrl: {
|
|
3
|
+
new (url: string | URL, base?: string | URL): URL;
|
|
4
|
+
prototype: URL;
|
|
5
|
+
canParse(url: string | URL, base?: string | URL): boolean;
|
|
6
|
+
createObjectURL(obj: Blob | MediaSource): string;
|
|
7
|
+
parse(url: string | URL, base?: string | URL): URL | null;
|
|
8
|
+
revokeObjectURL(url: string): void;
|
|
9
|
+
};
|
|
10
|
+
export { BrowserUrl as URL };
|
|
11
|
+
export * from './lib/index.ts';
|
|
12
|
+
//# sourceMappingURL=index-browser.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// src/lib/isLocalhost.ts
|
|
2
|
+
var isLocalhost = (hostname) => {
|
|
3
|
+
return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1" || hostname.endsWith(".localhost");
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
// src/index-browser.ts
|
|
7
|
+
var BrowserUrl = URL;
|
|
8
|
+
export {
|
|
9
|
+
BrowserUrl as URL,
|
|
10
|
+
isLocalhost
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index-browser.mjs.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Platform-neutral URL class, aliased from the global `URL`. */
|
|
2
|
+
declare const NeutralUrl: {
|
|
3
|
+
new (url: string | URL, base?: string | URL): URL;
|
|
4
|
+
prototype: URL;
|
|
5
|
+
canParse(url: string | URL, base?: string | URL): boolean;
|
|
6
|
+
createObjectURL(obj: Blob | MediaSource): string;
|
|
7
|
+
parse(url: string | URL, base?: string | URL): URL | null;
|
|
8
|
+
revokeObjectURL(url: string): void;
|
|
9
|
+
};
|
|
10
|
+
export { NeutralUrl as URL };
|
|
11
|
+
export * from './lib/index.ts';
|
|
12
|
+
//# sourceMappingURL=index-neutral.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { URL } from 'node:url';
|
|
2
|
+
/** Node.js-specific URL class, imported from the `node:url` module. */
|
|
3
|
+
declare const NodeUrl: {
|
|
4
|
+
new (url: string | URL, base?: string | URL): URL;
|
|
5
|
+
prototype: URL;
|
|
6
|
+
canParse(input: string | URL, base?: string | URL): boolean;
|
|
7
|
+
createObjectURL(blob: import("node:buffer").Blob): string;
|
|
8
|
+
parse(input: string | URL, base?: string | URL): URL | null;
|
|
9
|
+
revokeObjectURL(id: string): void;
|
|
10
|
+
};
|
|
11
|
+
export { NodeUrl as URL };
|
|
12
|
+
export * from './lib/index.ts';
|
|
13
|
+
//# sourceMappingURL=index-node.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks whether a hostname refers to the local machine (localhost, 127.0.0.1, ::1, or *.localhost).
|
|
3
|
+
* @param hostname - The hostname to check
|
|
4
|
+
* @returns `true` if the hostname is a localhost address
|
|
5
|
+
*/
|
|
6
|
+
export declare const isLocalhost: (hostname: string) => boolean;
|
|
7
|
+
//# sourceMappingURL=isLocalhost.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Browser-specific URL class, aliased from the global `URL`. */
|
|
2
|
+
declare const BrowserUrl: {
|
|
3
|
+
new (url: string | URL, base?: string | URL): URL;
|
|
4
|
+
prototype: URL;
|
|
5
|
+
canParse(url: string | URL, base?: string | URL): boolean;
|
|
6
|
+
createObjectURL(obj: Blob | MediaSource): string;
|
|
7
|
+
parse(url: string | URL, base?: string | URL): URL | null;
|
|
8
|
+
revokeObjectURL(url: string): void;
|
|
9
|
+
};
|
|
10
|
+
export { BrowserUrl as URL };
|
|
11
|
+
export * from './lib/index.ts';
|
|
12
|
+
//# sourceMappingURL=index-browser.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Platform-neutral URL class, aliased from the global `URL`. */
|
|
2
|
+
declare const NeutralUrl: {
|
|
3
|
+
new (url: string | URL, base?: string | URL): URL;
|
|
4
|
+
prototype: URL;
|
|
5
|
+
canParse(url: string | URL, base?: string | URL): boolean;
|
|
6
|
+
createObjectURL(obj: Blob | MediaSource): string;
|
|
7
|
+
parse(url: string | URL, base?: string | URL): URL | null;
|
|
8
|
+
revokeObjectURL(url: string): void;
|
|
9
|
+
};
|
|
10
|
+
export { NeutralUrl as URL };
|
|
11
|
+
export * from './lib/index.ts';
|
|
12
|
+
//# sourceMappingURL=index-neutral.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// src/lib/isLocalhost.ts
|
|
2
|
+
var isLocalhost = (hostname) => {
|
|
3
|
+
return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1" || hostname.endsWith(".localhost");
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
// src/index-neutral.ts
|
|
7
|
+
var NeutralUrl = URL;
|
|
8
|
+
export {
|
|
9
|
+
NeutralUrl as URL,
|
|
10
|
+
isLocalhost
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index-neutral.mjs.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { URL } from 'node:url';
|
|
2
|
+
/** Node.js-specific URL class, imported from the `node:url` module. */
|
|
3
|
+
declare const NodeUrl: {
|
|
4
|
+
new (url: string | URL, base?: string | URL): URL;
|
|
5
|
+
prototype: URL;
|
|
6
|
+
canParse(input: string | URL, base?: string | URL): boolean;
|
|
7
|
+
createObjectURL(blob: import("node:buffer").Blob): string;
|
|
8
|
+
parse(input: string | URL, base?: string | URL): URL | null;
|
|
9
|
+
revokeObjectURL(id: string): void;
|
|
10
|
+
};
|
|
11
|
+
export { NodeUrl as URL };
|
|
12
|
+
export * from './lib/index.ts';
|
|
13
|
+
//# sourceMappingURL=index-node.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks whether a hostname refers to the local machine (localhost, 127.0.0.1, ::1, or *.localhost).
|
|
3
|
+
* @param hostname - The hostname to check
|
|
4
|
+
* @returns `true` if the hostname is a localhost address
|
|
5
|
+
*/
|
|
6
|
+
export declare const isLocalhost: (hostname: string) => boolean;
|
|
7
|
+
//# sourceMappingURL=isLocalhost.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Browser-specific URL class, aliased from the global `URL`. */
|
|
2
|
+
declare const BrowserUrl: {
|
|
3
|
+
new (url: string | URL, base?: string | URL): URL;
|
|
4
|
+
prototype: URL;
|
|
5
|
+
canParse(url: string | URL, base?: string | URL): boolean;
|
|
6
|
+
createObjectURL(obj: Blob | MediaSource): string;
|
|
7
|
+
parse(url: string | URL, base?: string | URL): URL | null;
|
|
8
|
+
revokeObjectURL(url: string): void;
|
|
9
|
+
};
|
|
10
|
+
export { BrowserUrl as URL };
|
|
11
|
+
export * from './lib/index.ts';
|
|
12
|
+
//# sourceMappingURL=index-browser.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Platform-neutral URL class, aliased from the global `URL`. */
|
|
2
|
+
declare const NeutralUrl: {
|
|
3
|
+
new (url: string | URL, base?: string | URL): URL;
|
|
4
|
+
prototype: URL;
|
|
5
|
+
canParse(url: string | URL, base?: string | URL): boolean;
|
|
6
|
+
createObjectURL(obj: Blob | MediaSource): string;
|
|
7
|
+
parse(url: string | URL, base?: string | URL): URL | null;
|
|
8
|
+
revokeObjectURL(url: string): void;
|
|
9
|
+
};
|
|
10
|
+
export { NeutralUrl as URL };
|
|
11
|
+
export * from './lib/index.ts';
|
|
12
|
+
//# sourceMappingURL=index-neutral.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { URL } from 'node:url';
|
|
2
|
+
/** Node.js-specific URL class, imported from the `node:url` module. */
|
|
3
|
+
declare const NodeUrl: {
|
|
4
|
+
new (url: string | URL, base?: string | URL): URL;
|
|
5
|
+
prototype: URL;
|
|
6
|
+
canParse(input: string | URL, base?: string | URL): boolean;
|
|
7
|
+
createObjectURL(blob: import("node:buffer").Blob): string;
|
|
8
|
+
parse(input: string | URL, base?: string | URL): URL | null;
|
|
9
|
+
revokeObjectURL(id: string): void;
|
|
10
|
+
};
|
|
11
|
+
export { NodeUrl as URL };
|
|
12
|
+
export * from './lib/index.ts';
|
|
13
|
+
//# sourceMappingURL=index-node.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/index-node.ts
|
|
2
|
+
import { URL } from "node:url";
|
|
3
|
+
|
|
4
|
+
// src/lib/isLocalhost.ts
|
|
5
|
+
var isLocalhost = (hostname) => {
|
|
6
|
+
return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1" || hostname.endsWith(".localhost");
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
// src/index-node.ts
|
|
10
|
+
var NodeUrl = URL;
|
|
11
|
+
export {
|
|
12
|
+
NodeUrl as URL,
|
|
13
|
+
isLocalhost
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=index-node.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks whether a hostname refers to the local machine (localhost, 127.0.0.1, ::1, or *.localhost).
|
|
3
|
+
* @param hostname - The hostname to check
|
|
4
|
+
* @returns `true` if the hostname is a localhost address
|
|
5
|
+
*/
|
|
6
|
+
export declare const isLocalhost: (hostname: string) => boolean;
|
|
7
|
+
//# sourceMappingURL=isLocalhost.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AssertConfig } from '../../error/neutral/index.ts';
|
|
2
|
+
/** Configuration object for zod factory functions, providing a name for error messages. */
|
|
3
|
+
export interface ZodFactoryConfigObject {
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
/** Configuration for zod factory assertion behavior, either an AssertConfig or a named config object. */
|
|
7
|
+
export type ZodFactoryConfig = AssertConfig | ZodFactoryConfigObject;
|
|
8
|
+
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export * from './zodAllFactory.ts';
|
|
3
|
+
export * from './zodAsAsyncFactory.ts';
|
|
4
|
+
export * from './zodAsFactory.ts';
|
|
5
|
+
export * from './zodIsFactory.ts';
|
|
6
|
+
export * from './zodToAsyncFactory.ts';
|
|
7
|
+
export * from './zodToFactory.ts';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|