Shared utilities for browsers and Node.js