···11-import "./polyfill";
11+import './polyfill'
2233-import { registerRootComponent } from "expo";
33+import { registerRootComponent } from 'expo'
4455-import App from "./App";
55+import App from './App'
6677// const App = require("./App").default;
8899// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
1010// It also ensures that whether you load the app in Expo Go or in a native build,
1111// the environment is set up appropriately
1212-registerRootComponent(App);
1212+registerRootComponent(App)
+14-14
example/metro.config.js
···11// Learn more https://docs.expo.io/guides/customizing-metro
22-const { getDefaultConfig } = require("expo/metro-config");
33-const path = require("path");
22+const { getDefaultConfig } = require('expo/metro-config')
33+const path = require('path')
4455-const config = getDefaultConfig(__dirname);
55+const config = getDefaultConfig(__dirname)
6677// npm v7+ will install ../node_modules/react and ../node_modules/react-native because of peerDependencies.
88// To prevent the incompatible react-native between ./node_modules/react-native and ../node_modules/react-native,
99// excludes the one from the parent folder when bundling.
1010config.resolver.blockList = [
1111 ...Array.from(config.resolver.blockList ?? []),
1212- new RegExp(path.resolve("..", "node_modules", "react")),
1313- new RegExp(path.resolve("..", "node_modules", "react-native")),
1414-];
1212+ new RegExp(path.resolve('..', 'node_modules', 'react')),
1313+ new RegExp(path.resolve('..', 'node_modules', 'react-native')),
1414+]
15151616config.resolver.nodeModulesPaths = [
1717- path.resolve(__dirname, "./node_modules"),
1818- path.resolve(__dirname, "../node_modules"),
1919-];
1717+ path.resolve(__dirname, './node_modules'),
1818+ path.resolve(__dirname, '../node_modules'),
1919+]
20202121config.resolver.extraNodeModules = {
2222- "expo-atproto-auth": "..",
2323-};
2222+ 'expo-atproto-auth': '..',
2323+}
24242525-config.watchFolders = [path.resolve(__dirname, "..")];
2525+config.watchFolders = [path.resolve(__dirname, '..')]
26262727config.transformer.getTransformOptions = async () => ({
2828 transform: {
2929 experimentalImportSupport: false,
3030 inlineRequires: true,
3131 },
3232-});
3232+})
33333434-module.exports = config;
3434+module.exports = config
+17-17
example/polyfill.ts
···11-import "react-native-url-polyfill/auto";
22-import "event-target-polyfill";
33-import "abortcontroller-polyfill/dist/polyfill-patch-fetch";
44-export {};
11+import 'react-native-url-polyfill/auto'
22+import 'event-target-polyfill'
33+import 'abortcontroller-polyfill/dist/polyfill-patch-fetch'
44+export {}
5566/**
77https://github.com/MaxArt2501/base64-js
···99Copyright (c) 2014 MaxArt2501
1010 */
11111212-const b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
1212+const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='
1313// Regular expression to check formal correctness of base64 encoded strings
1414const b64re =
1515- /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
1515+ /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/
16161717globalThis.atob = (str: string): string => {
1818 // atob can work with strings with whitespaces, even inside the encoded part,
1919 // but only \t, \n, \f, \r and ' ', which can be stripped.
2020- str = String(str).replace(/[\t\n\f\r ]+/g, "");
2020+ str = String(str).replace(/[\t\n\f\r ]+/g, '')
2121 if (!b64re.test(str)) {
2222 throw new TypeError(
2323- "Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.",
2424- );
2323+ "Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded."
2424+ )
2525 }
26262727 // Adding the padding if missing, for simplicity
2828- str += "==".slice(2 - (str.length & 3));
2828+ str += '=='.slice(2 - (str.length & 3))
2929 var bitmap,
3030- result = "",
3030+ result = '',
3131 r1,
3232 r2,
3333- i = 0;
3333+ i = 0
3434 for (; i < str.length; ) {
3535 bitmap =
3636 (b64.indexOf(str.charAt(i++)) << 18) |
3737 (b64.indexOf(str.charAt(i++)) << 12) |
3838 ((r1 = b64.indexOf(str.charAt(i++))) << 6) |
3939- (r2 = b64.indexOf(str.charAt(i++)));
3939+ (r2 = b64.indexOf(str.charAt(i++)))
40404141 result +=
4242 r1 === 64
···4646 : String.fromCharCode(
4747 (bitmap >> 16) & 255,
4848 (bitmap >> 8) & 255,
4949- bitmap & 255,
5050- );
4949+ bitmap & 255
5050+ )
5151 }
5252- return result;
5353-};
5252+ return result
5353+}