This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dir=$(mktemp -d) && cd "$dir" | |
| npm pack expo-modules-core@58.0.29 --silent >/dev/null && tar -xzf expo-modules-core-58.0.29.tgz | |
| mkdir release && tar -xzf package/prebuilds/output/release/xcframeworks/ExpoModulesCore.tar.gz -C release | |
| framework=$(find release -path '*/ios-arm64/ExpoModulesCore.framework' -type d) | |
| ls "$(dirname "$framework")" | |
| cp "$framework/ExpoModulesCore" stripped && strip -x stripped | |
| echo "ExpoModulesCore: $(stat -f %z "$framework/ExpoModulesCore") -> $(stat -f %z stripped) bytes after strip -x" | |
| nm -a "$framework/ExpoModulesCore" | grep -m 1 ' OSO ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Step 1 leaves a write transaction open whose pages have spilled into the | |
| // db file; the page then terminates this worker, as closing a tab would. | |
| // Step 2 runs in a new worker and reads the db, like the reloaded page. | |
| const q = new URLSearchParams(location.search); | |
| const { default: sqlite3InitModule } = await import(q.get("module")); | |
| const sqlite3 = await sqlite3InitModule(); | |
| const name = q.get("name"); | |
| const lockingMode = q.get("lockingMode") ?? "normal"; | |
| const ROWS = "select count(*) || ' rows, ' || sum(v = zeroblob(3000)) || ' unchanged' from t"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Promise.withResolvers polyfill for Node.js 20 | |
| /* eslint-disable */ | |
| Promise.withResolvers || | |
| // @ts-expect-error | |
| (Promise.withResolvers = function withResolvers() { | |
| var a, | |
| b, | |
| c = new this(function (resolve, reject) { | |
| a = resolve; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Typed Web Worker. | |
| * | |
| * type InputData = { name: string }; | |
| * type OutputData = { nameLength: number } | |
| * | |
| * // main.js | |
| * const worker = createTypedWorker<InputData, OutputData>(worker); | |
| * | |
| * // worker.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { pipe } from 'fp-ts/function'; | |
| import { lens } from 'monocle-ts'; | |
| import { memo, useLayoutEffect, useRef, useState } from 'react'; | |
| import { LayoutChangeEvent, Text, View } from 'react-native'; | |
| import { useTheme } from '../contexts/ThemeContext'; | |
| const isOverflown = ({ | |
| clientWidth, | |
| clientHeight, | |
| scrollWidth, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ColorSchemeName, Platform, StyleSheet, ViewStyle } from 'react-native'; | |
| // AFAIK, Android has a problem with negative margins. | |
| type RhythmSize = 'XXS' | 'XS' | 'Sm' | '' | 'Lg' | 'XL' | 'XXL'; | |
| type RhythmProp = | |
| | `${ | |
| | 'm' | |
| | 'p' | |
| | `${'m' | 'p'}${'l' | 'r' | 't' | 'b' | 'v' | 'h'}`}${RhythmSize}` | |
| | `${'w' | 'h' | `${'max' | 'min'}${'W' | 'H'}`}${RhythmSize}` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Link, { LinkProps } from 'next/link'; | |
| import React, { | |
| forwardRef, | |
| ReactNode, | |
| useCallback, | |
| useMemo, | |
| useState, | |
| } from 'react'; | |
| import { | |
| StyleSheet, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Link from 'next/link'; | |
| import React, { | |
| forwardRef, | |
| ReactNode, | |
| useCallback, | |
| useMemo, | |
| useState, | |
| } from 'react'; | |
| import { | |
| StyleSheet, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { either } from 'fp-ts'; | |
| import { constVoid } from 'fp-ts/lib/function'; | |
| import { pipe } from 'fp-ts/lib/pipeable'; | |
| import * as t from 'io-ts'; | |
| import { useCallback } from 'react'; | |
| import { Api } from '../types'; | |
| import { useApi } from './useApi'; | |
| import { Form, useForm } from './useForm'; | |
| export const useMutation = < |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as E from 'fp-ts/lib/Either'; | |
| import { absurd, constVoid } from 'fp-ts/lib/function'; | |
| import { pipe } from 'fp-ts/lib/pipeable'; | |
| import * as TE from 'fp-ts/lib/TaskEither'; | |
| import * as t from 'io-ts'; | |
| import { useCallback } from 'react'; | |
| import { Api, ApiError, FetchError } from '../types'; | |
| import { Form, useForm } from './useForm'; | |
| // Basically, every HTTP request is a mutation. |
NewerOlder