@twurple/common
Advanced tools
| export declare function qsStringify(obj: Record<string, string | number | null | undefined | Array<string | number>> | undefined): string; | ||
| //# sourceMappingURL=qs.d.ts.map |
+21
| export function qsStringify(obj) { | ||
| if (!obj) { | ||
| return ''; | ||
| } | ||
| const params = new URLSearchParams(); | ||
| for (const [key, value] of Object.entries(obj)) { | ||
| if (value === null) { | ||
| params.append(key, ''); | ||
| } | ||
| else if (Array.isArray(value)) { | ||
| for (const v of value) { | ||
| params.append(key, v.toString()); | ||
| } | ||
| } | ||
| else if (value !== undefined) { | ||
| params.append(key, value.toString()); | ||
| } | ||
| } | ||
| const result = params.toString(); | ||
| return result ? `?${result}` : ''; | ||
| } |
@@ -1,2 +0,2 @@ | ||
| import { CustomError } from './CustomError'; | ||
| import { CustomError } from './CustomError.js'; | ||
| /** | ||
@@ -3,0 +3,0 @@ * These are the kind of errors that should never happen. |
@@ -1,2 +0,2 @@ | ||
| import { CustomError } from './CustomError'; | ||
| import { CustomError } from './CustomError.js'; | ||
| /** | ||
@@ -3,0 +3,0 @@ * These are the kind of errors that should never happen. |
@@ -1,2 +0,2 @@ | ||
| import { CustomError } from './CustomError'; | ||
| import { CustomError } from './CustomError.js'; | ||
| /** | ||
@@ -3,0 +3,0 @@ * Thrown when a relation that is expected to never be null does return null. |
@@ -1,2 +0,2 @@ | ||
| import { CustomError } from './CustomError'; | ||
| import { CustomError } from './CustomError.js'; | ||
| /** | ||
@@ -3,0 +3,0 @@ * Thrown when a relation that is expected to never be null does return null. |
@@ -1,3 +0,3 @@ | ||
| import { DataObject } from '../DataObject'; | ||
| import { type HelixExtensionConfigurationLocation, type HelixExtensionData, type HelixExtensionIconSize, type HelixExtensionState, type HelixExtensionSubscriptionsSupportLevel } from './HelixExtension.external'; | ||
| import { DataObject } from '../DataObject.js'; | ||
| import { type HelixExtensionConfigurationLocation, type HelixExtensionData, type HelixExtensionIconSize, type HelixExtensionState, type HelixExtensionSubscriptionsSupportLevel } from './HelixExtension.external.js'; | ||
| /** | ||
@@ -4,0 +4,0 @@ * A Twitch Extension. |
| import { __decorate } from "tslib"; | ||
| import { DataObject, rawDataSymbol } from '../DataObject'; | ||
| import { rtfm } from '../rtfm'; | ||
| import { DataObject, rawDataSymbol } from '../DataObject.js'; | ||
| import { rtfm } from '../rtfm.js'; | ||
| /** | ||
@@ -5,0 +5,0 @@ * A Twitch Extension. |
+13
-12
@@ -1,13 +0,14 @@ | ||
| export { DataObject, getRawData, rawDataSymbol } from './DataObject'; | ||
| export { getMockApiPort } from './mockApiPort'; | ||
| export { checkRelationAssertion } from './relations'; | ||
| export { rtfm } from './rtfm'; | ||
| export type { CommercialLength, HelixUserType } from './types'; | ||
| export { HelixExtension } from './extensions/HelixExtension'; | ||
| export type { HelixExtensionConfigurationLocation, HelixExtensionState, HelixExtensionIconSize, HelixExtensionSubscriptionsSupportLevel, HelixExtensionData, } from './extensions/HelixExtension.external'; | ||
| export { CustomError } from './errors/CustomError'; | ||
| export { HellFreezesOverError } from './errors/HellFreezesOverError'; | ||
| export { RelationAssertionError } from './errors/RelationAssertionError'; | ||
| export type { UserIdResolvable, UserIdResolvableType, UserNameResolvable, UserNameResolveableType, } from './userResolvers'; | ||
| export { extractUserId, extractUserName } from './userResolvers'; | ||
| export { DataObject, getRawData, rawDataSymbol } from './DataObject.js'; | ||
| export { getMockApiPort } from './mockApiPort.js'; | ||
| export { qsStringify } from './qs.js'; | ||
| export { checkRelationAssertion } from './relations.js'; | ||
| export { rtfm } from './rtfm.js'; | ||
| export type { CommercialLength, HelixUserType } from './types.js'; | ||
| export { HelixExtension } from './extensions/HelixExtension.js'; | ||
| export type { HelixExtensionConfigurationLocation, HelixExtensionState, HelixExtensionIconSize, HelixExtensionSubscriptionsSupportLevel, HelixExtensionData, } from './extensions/HelixExtension.external.js'; | ||
| export { CustomError } from './errors/CustomError.js'; | ||
| export { HellFreezesOverError } from './errors/HellFreezesOverError.js'; | ||
| export { RelationAssertionError } from './errors/RelationAssertionError.js'; | ||
| export type { UserIdResolvable, UserIdResolvableType, UserNameResolvable, UserNameResolveableType, } from './userResolvers.js'; | ||
| export { extractUserId, extractUserName } from './userResolvers.js'; | ||
| //# sourceMappingURL=index.d.ts.map |
+10
-9
@@ -1,9 +0,10 @@ | ||
| export { DataObject, getRawData, rawDataSymbol } from './DataObject'; | ||
| export { getMockApiPort } from './mockApiPort'; | ||
| export { checkRelationAssertion } from './relations'; | ||
| export { rtfm } from './rtfm'; | ||
| export { HelixExtension } from './extensions/HelixExtension'; | ||
| export { CustomError } from './errors/CustomError'; | ||
| export { HellFreezesOverError } from './errors/HellFreezesOverError'; | ||
| export { RelationAssertionError } from './errors/RelationAssertionError'; | ||
| export { extractUserId, extractUserName } from './userResolvers'; | ||
| export { DataObject, getRawData, rawDataSymbol } from './DataObject.js'; | ||
| export { getMockApiPort } from './mockApiPort.js'; | ||
| export { qsStringify } from './qs.js'; | ||
| export { checkRelationAssertion } from './relations.js'; | ||
| export { rtfm } from './rtfm.js'; | ||
| export { HelixExtension } from './extensions/HelixExtension.js'; | ||
| export { CustomError } from './errors/CustomError.js'; | ||
| export { HellFreezesOverError } from './errors/HellFreezesOverError.js'; | ||
| export { RelationAssertionError } from './errors/RelationAssertionError.js'; | ||
| export { extractUserId, extractUserName } from './userResolvers.js'; |
+1
-1
@@ -1,2 +0,2 @@ | ||
| import { RelationAssertionError } from './errors/RelationAssertionError'; | ||
| import { RelationAssertionError } from './errors/RelationAssertionError.js'; | ||
| /** @private */ | ||
@@ -3,0 +3,0 @@ export function checkRelationAssertion(value) { |
+1
-1
| { | ||
| "name": "@twurple/common", | ||
| "version": "8.0.0", | ||
| "version": "8.0.1", | ||
| "publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
30636
3.11%29
7.41%884
2.79%