mirror of
https://github.com/gnmyt/LicenseAPI.git
synced 2026-01-11 18:51:47 +00:00
Fix linting
This commit is contained in:
@ -29,26 +29,26 @@ export const generateRandom = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const replaceLicenseDefaults = (defaultKey: string) => {
|
export const replaceLicenseDefaults = (defaultKey: string) => {
|
||||||
return defaultKey.split('').map(char => {
|
return defaultKey.split("").map(char => {
|
||||||
switch (char) {
|
switch (char) {
|
||||||
case 'N':
|
case "N":
|
||||||
return String(Math.floor(Math.random() * 10));
|
return String(Math.floor(Math.random() * 10));
|
||||||
case 'C':
|
case "C":
|
||||||
return generateCharacter();
|
return generateCharacter();
|
||||||
case 'L':
|
case "L":
|
||||||
return String.fromCharCode(Math.floor(Math.random() * 26) + 97);
|
return String.fromCharCode(Math.floor(Math.random() * 26) + 97);
|
||||||
case 'U':
|
case "U":
|
||||||
return String.fromCharCode(Math.floor(Math.random() * 26) + 65);
|
return String.fromCharCode(Math.floor(Math.random() * 26) + 65);
|
||||||
case 'S':
|
case "S":
|
||||||
return generateSpecialCharacter();
|
return generateSpecialCharacter();
|
||||||
case 'A':
|
case "A":
|
||||||
return generateAlphaNumeric();
|
return generateAlphaNumeric();
|
||||||
case 'R':
|
case "R":
|
||||||
return generateRandom();
|
return generateRandom();
|
||||||
default:
|
default:
|
||||||
return char;
|
return char;
|
||||||
}
|
}
|
||||||
}).join('');
|
}).join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
export const checkLicenseConfiguration = async (access: IProject, config: ILicense) => {
|
export const checkLicenseConfiguration = async (access: IProject, config: ILicense) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user