chokidar(obj, path = '')
Wraps an object and returns a proxied version that emits events on changes. Supports:
- Plain objects
- Arrays
- Maps
- Sets
Parameters:
obj– The object, array, Map, or Set to watch.path– Optional string indicating the root path (useful for nested structures).
Returns:
A proxied version of obj that emits events for any changes.