Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function setUniqueUrls (collection: ClientScript[]): ClientScript[] {
const scriptsWithDuplicatedUrls = getDuplicatedScripts(collection);
for (let i = 0; i < scriptsWithDuplicatedUrls.length; i++)
scriptsWithDuplicatedUrls[i].url = scriptsWithDuplicatedUrls[i].url + '-' + generateUniqueId(ClientScript.URL_UNIQUE_PART_LENGTH);
return collection;
}
public constructor (init: string | ClientScriptInit, basePath: string) {
this.init = init || null;
this.url = generateUniqueId(URL_UNIQUE_PART_LENGTH);
this.content = '';
this.path = null;
this.module = null;
this.hash = null;
this.page = RequestFilterRule.ANY;
this.basePath = basePath;
}