diff options
Diffstat (limited to 'src/global.js')
| -rw-r--r-- | src/global.js | 32 |
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; |