footprintjs - v11.2.0
    Preparing search index...

    Function shouldWrapWithProxy

    • Returns true if the value should be wrapped in a deep Proxy.

      Only plain objects ({}) and arrays are wrappable. Primitives, null, Date, Map, Set, RegExp, class instances, etc. are NOT wrapped.

      Detection strategy (order matters):

      1. Primitives and null -> false (fast exit)
      2. Frozen/sealed objects -> false (nested set traps would silently fail)
      3. Arrays -> true (fast exit)
      4. Prototype check -> plain objects (isPlainObject) are wrappable
      5. Tag check -> catch built-ins with internal slots (Date, Map, Set, etc.)
      6. Everything else -> class instance, not wrappable

      Prototype check comes BEFORE tag check to prevent Symbol.toStringTag spoofing: a plain object with { [Symbol.toStringTag]: 'Date' } would fool the tag check but is correctly identified as a plain object by its prototype.

      Parameters

      • value: unknown

      Returns boolean