Skip to content

Commit a81fe10

Browse files
committed
Updates
1 parent 2311ae9 commit a81fe10

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/guard/guard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export function TakeLeft<T, True extends (left: T, right: T[]) => unknown, False
189189
// --------------------------------------------------------------------------
190190
// Object
191191
// --------------------------------------------------------------------------
192-
/** Returns true if the PropertyKey appears unsafe (prototype-pollution). */
192+
/** Returns true if the PropertyKey is Unsafe (ref: prototype-pollution). */
193193
export function IsUnsafePropertyKey(key: PropertyKey): boolean {
194194
return IsEqual(key, '__proto__') || IsEqual(key, 'constructor') || IsEqual(key, 'prototype')
195195
}

src/value/clone/clone.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function FromClassInstance(value: Record<PropertyKey, unknown>): Record<Property
4949
function FromObjectInstance(value: Record<PropertyKey, unknown>): Record<PropertyKey, unknown> {
5050
const result = {} as Record<PropertyKey, unknown>
5151
for (const key of Guard.Keys(value)) {
52-
if (Guard.IsUnsafePropertyKey(key)) continue
52+
if (Guard.IsUnsafePropertyKey(key)) continue // (ignore: prototype-pollution)
5353
result[key] = Clone(value[key])
5454
}
5555
for (const key of Guard.Symbols(value)) {

0 commit comments

Comments
 (0)