react-native-asset
Version:
Linking and unlinking of assets in your react-native app, works for fonts and sounds
13 lines (12 loc) • 420 B
JavaScript
;
// Copyright 2018-2025 the Deno authors. MIT license.
// This module is browser compatible.
Object.defineProperty(exports, "__esModule", { value: true });
exports.assertArg = assertArg;
function assertArg(url) {
url = url instanceof URL ? url : new URL(url);
if (url.protocol !== "file:") {
throw new TypeError(`URL must be a file URL: received "${url.protocol}"`);
}
return url;
}