minify.d.ts 911 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import { IconifyJSON } from '@iconify/types';
  2. /**
  3. * Minify icon set
  4. *
  5. * Function finds common values for few numeric properties, such as 'width' and 'height' (see defaultIconDimensions keys for list of properties),
  6. * removes entries from icons and sets default entry in root of icon set object.
  7. *
  8. * For example, this:
  9. * {
  10. * icons: {
  11. * foo: {
  12. * body: '<g />',
  13. * width: 24
  14. * },
  15. * bar: {
  16. * body: '<g />',
  17. * width: 24
  18. * },
  19. * baz: {
  20. * body: '<g />',
  21. * width: 16
  22. * }
  23. * }
  24. * }
  25. * is changed to this:
  26. * {
  27. * icons: {
  28. * foo: {
  29. * body: '<g />'
  30. * },
  31. * bar: {
  32. * body: '<g />'
  33. * },
  34. * baz: {
  35. * body: '<g />',
  36. * width: 16
  37. * }
  38. * },
  39. * width: 24
  40. * }
  41. */
  42. declare function minifyIconSet(data: IconifyJSON): void;
  43. export { minifyIconSet };