@effect/platform
Advanced tools
Comparing version 0.58.12 to 0.58.13
@@ -42,12 +42,12 @@ "use strict"; | ||
const fromInput = input => { | ||
if (Symbol.iterator in input) { | ||
return Arr.fromIterable(input).map(([key, value]) => [key, String(value)]); | ||
} | ||
const entries = Symbol.iterator in input ? Arr.fromIterable(input) : Object.entries(input); | ||
const out = []; | ||
for (const [key, value] of Object.entries(input)) { | ||
for (const [key, value] of entries) { | ||
if (Array.isArray(value)) { | ||
for (let i = 0; i < value.length; i++) { | ||
out.push([key, String(value[i])]); | ||
if (value[i] !== undefined) { | ||
out.push([key, String(value[i])]); | ||
} | ||
} | ||
} else { | ||
} else if (value !== undefined) { | ||
out.push([key, String(value)]); | ||
@@ -54,0 +54,0 @@ } |
@@ -25,3 +25,3 @@ /** | ||
*/ | ||
export type Coercible = string | number | bigint | boolean; | ||
export type Coercible = string | number | bigint | boolean | null | undefined; | ||
/** | ||
@@ -28,0 +28,0 @@ * @since 1.0.0 |
@@ -11,12 +11,12 @@ import * as Schema from "@effect/schema/Schema"; | ||
export const fromInput = input => { | ||
if (Symbol.iterator in input) { | ||
return Arr.fromIterable(input).map(([key, value]) => [key, String(value)]); | ||
} | ||
const entries = Symbol.iterator in input ? Arr.fromIterable(input) : Object.entries(input); | ||
const out = []; | ||
for (const [key, value] of Object.entries(input)) { | ||
for (const [key, value] of entries) { | ||
if (Array.isArray(value)) { | ||
for (let i = 0; i < value.length; i++) { | ||
out.push([key, String(value[i])]); | ||
if (value[i] !== undefined) { | ||
out.push([key, String(value[i])]); | ||
} | ||
} | ||
} else { | ||
} else if (value !== undefined) { | ||
out.push([key, String(value)]); | ||
@@ -23,0 +23,0 @@ } |
{ | ||
"name": "@effect/platform", | ||
"version": "0.58.12", | ||
"version": "0.58.13", | ||
"description": "Unified interfaces for common platform-specific services", | ||
@@ -18,4 +18,4 @@ "license": "MIT", | ||
"peerDependencies": { | ||
"@effect/schema": "^0.68.11", | ||
"effect": "^3.4.4" | ||
"@effect/schema": "^0.68.12", | ||
"effect": "^3.4.5" | ||
}, | ||
@@ -22,0 +22,0 @@ "publishConfig": { |
@@ -32,3 +32,3 @@ /** | ||
*/ | ||
export type Coercible = string | number | bigint | boolean | ||
export type Coercible = string | number | bigint | boolean | null | undefined | ||
@@ -40,12 +40,12 @@ /** | ||
export const fromInput = (input: Input): UrlParams => { | ||
if (Symbol.iterator in input) { | ||
return Arr.fromIterable(input).map(([key, value]) => [key, String(value)]) | ||
} | ||
const entries = Symbol.iterator in input ? Arr.fromIterable(input) : Object.entries(input) | ||
const out: Array<readonly [string, string]> = [] | ||
for (const [key, value] of Object.entries(input)) { | ||
for (const [key, value] of entries) { | ||
if (Array.isArray(value)) { | ||
for (let i = 0; i < value.length; i++) { | ||
out.push([key, String(value[i])]) | ||
if (value[i] !== undefined) { | ||
out.push([key, String(value[i])]) | ||
} | ||
} | ||
} else { | ||
} else if (value !== undefined) { | ||
out.push([key, String(value)]) | ||
@@ -52,0 +52,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
2211481