@cyrilld/zestds 0.1.0 → 1.0.0

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.
package/dist/flags.cjs CHANGED
@@ -270,10 +270,11 @@ var FLAG_ALIAS = {
270
270
  "GB-2": "GB-ENG",
271
271
  "ENG": "GB-ENG"
272
272
  };
273
+ var ZEST_FLAG_BY_CODE = new Map(ZEST_FLAGS.map((flag) => [flag.code.toUpperCase(), flag]));
273
274
  var findFlag = (code) => {
274
275
  const c = code.trim().toUpperCase();
275
276
  const cible = FLAG_ALIAS[c] ?? c;
276
- return ZEST_FLAGS.find((f) => f.code.toUpperCase() === cible);
277
+ return ZEST_FLAG_BY_CODE.get(cible);
277
278
  };
278
279
 
279
280
  // src/components/foundations/flag-icons/index.tsx