@augment-vir/common
Advanced tools
Comparing version 17.0.0 to 18.0.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.searchParamStringToObject = exports.objectToSearchParamsString = void 0; | ||
exports.urlToSearchParamsObject = exports.objectToSearchParamsString = void 0; | ||
const boolean_1 = require("../boolean"); | ||
@@ -24,3 +24,3 @@ const matches_object_shape_1 = require("../object/matches-object-shape"); | ||
exports.objectToSearchParamsString = objectToSearchParamsString; | ||
function searchParamStringToObject(inputUrl, verifyShape) { | ||
function urlToSearchParamsObject(inputUrl, verifyShape) { | ||
const urlForSearchParams = (0, runtime_type_of_1.isRuntimeTypeOf)(inputUrl, 'string') ? new URL(inputUrl) : inputUrl; | ||
@@ -34,2 +34,2 @@ const searchEntries = Array.from(urlForSearchParams.searchParams.entries()); | ||
} | ||
exports.searchParamStringToObject = searchParamStringToObject; | ||
exports.urlToSearchParamsObject = urlToSearchParamsObject; |
@@ -20,3 +20,3 @@ import { isTruthy } from '../boolean'; | ||
} | ||
export function searchParamStringToObject(inputUrl, verifyShape) { | ||
export function urlToSearchParamsObject(inputUrl, verifyShape) { | ||
const urlForSearchParams = isRuntimeTypeOf(inputUrl, 'string') ? new URL(inputUrl) : inputUrl; | ||
@@ -23,0 +23,0 @@ const searchEntries = Array.from(urlForSearchParams.searchParams.entries()); |
import { Primitive } from 'type-fest'; | ||
export type SearchParamObjectBase = Record<string, Exclude<Primitive, symbol>>; | ||
export declare function objectToSearchParamsString(inputObject: SearchParamObjectBase): string; | ||
export declare function searchParamStringToObject<VerifyShapeGeneric extends SearchParamObjectBase>(inputUrl: string | Pick<URL, 'searchParams'>, verifyShape: VerifyShapeGeneric): VerifyShapeGeneric; | ||
export declare function searchParamStringToObject<VerifyShapeGeneric extends SearchParamObjectBase>(inputUrl: string | Pick<URL, 'searchParams'>, verifyShape?: VerifyShapeGeneric | undefined): Record<string, string>; | ||
export declare function urlToSearchParamsObject<VerifyShapeGeneric extends SearchParamObjectBase>(inputUrl: string | Pick<URL, 'searchParams'>, verifyShape: VerifyShapeGeneric): VerifyShapeGeneric; | ||
export declare function urlToSearchParamsObject<VerifyShapeGeneric extends SearchParamObjectBase>(inputUrl: string | Pick<URL, 'searchParams'>, verifyShape?: VerifyShapeGeneric | undefined): Record<string, string>; |
{ | ||
"name": "@augment-vir/common", | ||
"version": "17.0.0", | ||
"version": "18.0.0", | ||
"homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/common", | ||
@@ -5,0 +5,0 @@ "bugs": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
157994