Back to Truffle Rush
SOURCE / PINNED RELEASE

Made of little things.

Truffle Rush

Release
bf9d57a12f82…
Author-recorded commit
bf11c370d93c…
License
LICENSE
Author’s source reference
nostr://npub1dmmh0futyszl4445mv4xrygkgsgj8vpu79yx3qyy9qxmz4pemtzqlqmc87/wss%3A%2F%2Fgit.napplet.soy%2F/n-dad0644224b

Archive hash verified: 261cbd0dce1d32f5…. The source-to-build association is the author’s claim; it has not been independently rebuilt.

src/domain-availability.ts
type NappletWindow = Window & {
  napplet?: Record<string, unknown>;
};

/** Return whether the runtime injected a domain for this load. */
export function hasDomain(
  napplet: Record<string, unknown> | undefined,
  domain: string,
): boolean {
  return Boolean(napplet?.[domain]);
}

/** Check a domain on the runtime-owned global without exposing it for calls. */
export function runtimeHasDomain(domain: string): boolean {
  return hasDomain((window as NappletWindow).napplet, domain);
}