favgen 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.mjs +7 -5
  2. package/package.json +1 -1
package/lib/index.mjs CHANGED
@@ -1,11 +1,13 @@
1
1
  import produceIconsImport from "./generator.js";
2
2
  import favgenVitePluginImport from "./vite-plugin.js";
3
3
  function normalizeDefaultExport(mod) {
4
- return (typeof mod === "object" &&
5
- mod !== null &&
6
- "default" in mod)
7
- ? mod.default
8
- : mod;
4
+ let current = mod;
5
+ while (typeof current === "object" &&
6
+ current !== null &&
7
+ "default" in current) {
8
+ current = current.default;
9
+ }
10
+ return current;
9
11
  }
10
12
  export const produceIcons = normalizeDefaultExport(produceIconsImport);
11
13
  export const favgenVitePlugin = normalizeDefaultExport(favgenVitePluginImport);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "favgen",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "CLI tool to generate a set of favicons from a single input file.",
5
5
  "keywords": [
6
6
  "favicon"