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
| ## Check if variable is array | |
| # @param mixed | |
| # @return integer 0 on success, 1 otherwise | |
| # | |
| # @example | |
| # value=("i'm an array" "and that's my 2nd value") | |
| # if is_array value; then | |
| # echo 'value is an Array' | |
| # else | |
| # echo 'value is NOT an Array' |
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 type { RouteDefinition } from "@solidjs/router"; | |
| /** | |
| * Refine a Type | |
| * @example | |
| * ```ts | |
| * type Refined = Refine<{ foo: string, bar: unknown[] }, { foo: `${number}` }> | |
| * // ^? { foo: `${number}`, bar: unknown[] } | |
| * ``` | |
| */ |
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
| /** | |
| * Refine a Type | |
| * @example | |
| * ```ts | |
| * type Refined = Refine<{ foo: string, bar: unknown[] }, { foo: `${number}` }> | |
| * // ^? { foo: `${number}`, bar: unknown[] } | |
| * ``` | |
| */ | |
| export type Refine<T, P extends Partial<T>> = { | |
| [k in keyof T]: T[k] & P[k]; |
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
| //@ts-expect-error no declaration files | |
| import {createSNICallback} from "anchor-pki/auto-cert/sni-callback"; | |
| //@ts-expect-error no declaration files | |
| import { TermsOfServiceAcceptor } from "anchor-pki/auto-cert/terms-of-service-acceptor"; | |
| import https from "node:https"; | |
| import type { FastifyServerFactory } from "fastify"; | |
| const serverFactory: FastifyServerFactory = (handler) => { | |
| const SNICallback = createSNICallback({ |
OlderNewer