How to use the whatwg-url.URL.revokeObjectURL function in whatwg-url

To help you get started, we’ve selected a few whatwg-url examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github StoDevX / AAO-React-Native / source / init / monkey-patch--url.js View on Github external
*
 * RN provides a global URL object… but only puts two things into it.
 *
 * The JSDOM project maintains a browser-compatible URL module.
 *
 * Thus, we stick that into the global namespace, and monkey-patch RN's
 * two non-standard methods onto it so as to not break either things that
 * expect web!URL or RN!URL objects.
 */

import {URL, URLSearchParams} from 'whatwg-url'

let RNURL = global.URL

URL.createObjectURL = RNURL.createObjectURL
URL.revokeObjectURL = RNURL.revokeObjectURL

global.URL = URL
global.URLSearchParams = URLSearchParams