UNPKG

youtube-likes-downloader

Version:
19 lines (17 loc) 448 B
/* eslint-disable camelcase */ import type { VideoInfo, VideoJSON } from '../types'; export function formatJSON( { id, title, channel, ext, resolution, duration, epoch }: VideoInfo & { resolution: [number, number]; duration: string }, ): VideoJSON { return { id, title, channel, ext, width : resolution[0], height : resolution[1], resolution : resolution.join('x'), duration_string: duration, epoch, }; }