summaryrefslogtreecommitdiffstats
path: root/src/global.js
diff options
context:
space:
mode:
authorMurilo Ijanc <[email protected]>2026-07-26 15:01:02 -0300
committerMurilo Ijanc <[email protected]>2026-07-26 15:01:02 -0300
commit36486007ccada8c31d30e8f528d21233cabce32c (patch)
treed14a108845e4c984ec922ba98d153c8d68da6ebb /src/global.js
downloadautofill-36486007ccada8c31d30e8f528d21233cabce32c.tar.gz
Initial importv0.1.0
Diffstat (limited to 'src/global.js')
-rw-r--r--src/global.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/global.js b/src/global.js
new file mode 100644
index 0000000..217a9a0
--- /dev/null
+++ b/src/global.js
@@ -0,0 +1,32 @@
+/**
+ * Entry point for the `<script>` build: publishes the same API as the module
+ * on `window.CepisAutofill`.
+ *
+ * @module
+ */
+
+import {
+ attach,
+ clearCache,
+ lookup,
+ normalizeCep,
+ CepisAutofillError,
+ MESSAGES,
+ VERSION,
+} from "./index.js";
+
+const CepisAutofill = {
+ attach,
+ lookup,
+ normalizeCep,
+ clearCache,
+ CepisAutofillError,
+ MESSAGES,
+ VERSION,
+};
+
+if (typeof window !== "undefined") {
+ window.CepisAutofill = CepisAutofill;
+}
+
+export default CepisAutofill;