summaryrefslogtreecommitdiffstats
path: root/src/global.js
blob: 217a9a09ed46134c38dcc9e4592f0abc5db7c0f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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;