@standardserver/shared
Advanced tools
+25
| # @standardserver/shared | ||
| <div align="center"> | ||
| <a href="https://codecov.io/gh/middleapi/standardserver"> | ||
| <img alt="codecov" src="https://codecov.io/gh/middleapi/standardserver/branch/main/graph/badge.svg"> | ||
| </a> | ||
| <a href="https://www.npmjs.com/package/@standardserver/shared"> | ||
| <img alt="weekly downloads" src="https://img.shields.io/npm/dw/%40standardserver%2Fshared?logo=npm" /> | ||
| </a> | ||
| <a href="https://github.com/middleapi/standardserver/blob/main/LICENSE"> | ||
| <img alt="MIT License" src="https://img.shields.io/github/license/middleapi/standardserver?logo=open-source-initiative" /> | ||
| </a> | ||
| <a href="https://discord.gg/TXEbwRBvQn"> | ||
| <img alt="Discord" src="https://img.shields.io/discord/1308966753044398161?color=7389D8&label&logo=discord&logoColor=ffffff" /> | ||
| </a> | ||
| <a href="https://deepwiki.com/middleapi/standardserver"> | ||
| <img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"> | ||
| </a> | ||
| </div> | ||
| This package contains shared types and utilities for the `@standardserver` ecosystem. It has no runtime dependencies and can be used in any JavaScript environment. | ||
| ## Learn more | ||
| For the higher-level project overview, see the root [Standard Server README](../../README.md). |
+1
-13
| declare function toArray<T>(value: T): T extends readonly any[] ? T : (T extends undefined | null ? never : T[]); | ||
| declare const PACKAGE_NAME = "@standardserver/shared"; | ||
| declare const PACKAGE_VERSION = "0.0.15"; | ||
| /** | ||
| * Generates a unique symbol for the specified name within the package scope. | ||
| * The symbol is globally registered using `Symbol.for` to ensure consistency across modules. | ||
| * | ||
| * @remarks | ||
| * - Ensure names are unique to avoid symbol collisions within the package. | ||
| * - Ensure package versions are synchronized (e.g., when the core package is updated, this package should also be updated). | ||
| */ | ||
| declare function getPackageSymbol(name: string): symbol; | ||
| /** | ||
| * Error thrown when an operation is aborted. | ||
@@ -136,3 +124,3 @@ * Uses the standardized 'AbortError' name for consistency with JavaScript APIs. | ||
| export { AbortError, AsyncIteratorClass, PACKAGE_NAME, PACKAGE_VERSION, Queue, SequentialIdGenerator, emitUnhandledRejection, getOrBind, getPackageSymbol, isAsyncIteratorObject, isTypescriptObject, omit, parseEmptyableJSON, sequential, sleep, stringifyJSON, toArray, tryDecodeURIComponent }; | ||
| export { AbortError, AsyncIteratorClass, Queue, SequentialIdGenerator, emitUnhandledRejection, getOrBind, isAsyncIteratorObject, isTypescriptObject, omit, parseEmptyableJSON, sequential, sleep, stringifyJSON, toArray, tryDecodeURIComponent }; | ||
| export type { AsyncCleanupFn, AsyncIteratorClassNextFn, GetOrBindOptions, SleepOptions }; |
+1
-13
| declare function toArray<T>(value: T): T extends readonly any[] ? T : (T extends undefined | null ? never : T[]); | ||
| declare const PACKAGE_NAME = "@standardserver/shared"; | ||
| declare const PACKAGE_VERSION = "0.0.15"; | ||
| /** | ||
| * Generates a unique symbol for the specified name within the package scope. | ||
| * The symbol is globally registered using `Symbol.for` to ensure consistency across modules. | ||
| * | ||
| * @remarks | ||
| * - Ensure names are unique to avoid symbol collisions within the package. | ||
| * - Ensure package versions are synchronized (e.g., when the core package is updated, this package should also be updated). | ||
| */ | ||
| declare function getPackageSymbol(name: string): symbol; | ||
| /** | ||
| * Error thrown when an operation is aborted. | ||
@@ -136,3 +124,3 @@ * Uses the standardized 'AbortError' name for consistency with JavaScript APIs. | ||
| export { AbortError, AsyncIteratorClass, PACKAGE_NAME, PACKAGE_VERSION, Queue, SequentialIdGenerator, emitUnhandledRejection, getOrBind, getPackageSymbol, isAsyncIteratorObject, isTypescriptObject, omit, parseEmptyableJSON, sequential, sleep, stringifyJSON, toArray, tryDecodeURIComponent }; | ||
| export { AbortError, AsyncIteratorClass, Queue, SequentialIdGenerator, emitUnhandledRejection, getOrBind, isAsyncIteratorObject, isTypescriptObject, omit, parseEmptyableJSON, sequential, sleep, stringifyJSON, toArray, tryDecodeURIComponent }; | ||
| export type { AsyncCleanupFn, AsyncIteratorClassNextFn, GetOrBindOptions, SleepOptions }; |
+1
-7
@@ -5,8 +5,2 @@ function toArray(value) { | ||
| const PACKAGE_NAME = "@standardserver/shared"; | ||
| const PACKAGE_VERSION = "0.0.15"; | ||
| function getPackageSymbol(name) { | ||
| return Symbol.for(`${PACKAGE_NAME}@${PACKAGE_VERSION}/${name}`); | ||
| } | ||
| class AbortError extends Error { | ||
@@ -244,2 +238,2 @@ constructor(...rest) { | ||
| export { AbortError, AsyncIteratorClass, PACKAGE_NAME, PACKAGE_VERSION, Queue, SequentialIdGenerator, emitUnhandledRejection, getOrBind, getPackageSymbol, isAsyncIteratorObject, isTypescriptObject, omit, parseEmptyableJSON, sequential, sleep, stringifyJSON, toArray, tryDecodeURIComponent }; | ||
| export { AbortError, AsyncIteratorClass, Queue, SequentialIdGenerator, emitUnhandledRejection, getOrBind, isAsyncIteratorObject, isTypescriptObject, omit, parseEmptyableJSON, sequential, sleep, stringifyJSON, toArray, tryDecodeURIComponent }; |
+2
-1
| { | ||
| "name": "@standardserver/shared", | ||
| "type": "module", | ||
| "version": "0.0.15", | ||
| "version": "0.0.16", | ||
| "license": "MIT", | ||
@@ -14,2 +14,3 @@ "homepage": "https://standardserver.dev", | ||
| "exports": { | ||
| "./package.json": "./package.json", | ||
| ".": { | ||
@@ -16,0 +17,0 @@ "types": "./dist/index.d.mts", |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
6
20%0
-100%26
Infinity%18007
-1.04%339
-5.04%