MCPcopy Index your code
hub / github.com/gridstack/gridstack.js / swap

Method swap

src/utils.ts:751–754  ·  view source on GitHub ↗

swap the given object 2 field values

(o: unknown, a: string, b: string)

Source from the content-addressed store, hash-verified

749
750 /** swap the given object 2 field values */
751 public static swap(o: unknown, a: string, b: string): void {
752 if (!o) return;
753 const tmp = o[a]; o[a] = o[b]; o[b] = tmp;
754 }
755
756 /** returns true if event is inside the given element rectangle */
757 // Note: Safari Mac has null event.relatedTarget which causes #1684 so check if DragEvent is inside the coordinates instead

Callers 2

_keyEventMethod · 0.45
utils-spec.tsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected