mirror of
https://github.com/logseq/logseq.git
synced 2026-05-15 16:32:21 +00:00
add docstrings
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
(ns frontend.util.js-module
|
||||
"Helpers for reading JavaScript module exports across ESM, CommonJS interop, and bundled namespace objects."
|
||||
(:require [goog.object :as gobj]))
|
||||
|
||||
(defn default-export
|
||||
"Returns the callable/default value from ESM, CommonJS interop, or namespace-shaped modules."
|
||||
[module]
|
||||
(or (when (some? module)
|
||||
(gobj/get module "default"))
|
||||
|
||||
Reference in New Issue
Block a user