All files / player-engine/src image-resize-algorithm.ts

100% Statements 3/3
100% Branches 0/0
100% Functions 1/1
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10375x       375x     2x    
export const IMAGE_RESIZE_ALGORITHMS = ['nearest', 'lanczos'] as const;
 
export type ImageResizeAlgorithm = (typeof IMAGE_RESIZE_ALGORITHMS)[number];
 
export const DEFAULT_IMAGE_RESIZE_ALGORITHM: ImageResizeAlgorithm = 'nearest';
 
export function isImageResizeAlgorithm(value: string): value is ImageResizeAlgorithm {
  return IMAGE_RESIZE_ALGORITHMS.includes(value as ImageResizeAlgorithm);
}