mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 20:57:13 -05:00
12 lines
416 B
TypeScript
12 lines
416 B
TypeScript
// Copyright: Ankitects Pty Ltd and contributors
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
export function globalExport(globals: Record<string, unknown>): void {
|
|
for (const key in globals) {
|
|
window[key] = globals[key];
|
|
}
|
|
|
|
// but also export as window.anki
|
|
window["anki"] = window["anki"] || {};
|
|
window["anki"] = { ...window["anki"], ...globals };
|
|
}
|