import { NameType } from '../config' ; import * as path from 'path' ; export function reName ( nameType , url ) { const fileName = path . basename ( url ) ; switch ( nameType ) { case NameType . timestamp : return `${ Date . now ( ) }-` + fileName ; case NameType . none : default : return `${ fileName }` ; } }