idb-kv-store icon indicating copy to clipboard operation
idb-kv-store copied to clipboard

Use globalThis as global by default

Open jhiesey opened this issue 4 years ago • 0 comments

Even though this module isn't going to work in a node environment, it is inconvenient that importing it throws since neither window nor self is defined.

The solution is to use the new standard global globalThis if available, which should be defined in all new environments. If it's not available, fall back to the previous behavior.

jhiesey avatar Mar 08 '21 22:03 jhiesey