Fixed the last linting errors.
This commit is contained in:
parent
4f1a52a1b0
commit
16a55ce537
5 changed files with 8 additions and 6 deletions
|
@ -14,7 +14,9 @@ export class Base64Encoder implements Converter {
|
|||
return btoa(input);
|
||||
} catch (exception) {
|
||||
console.error(exception);
|
||||
throw new Error('Ouch! Looks like you've got a UTF-8 character there. Too bad, this is not supported yet. We're working on it and hope to be ready soon! Why don't you <a href=\'https://duckduckgo.com/?q=cute+kitties&iar=images\'>enjoy some kittens</a> meanwhile?');
|
||||
throw new Error('Ouch! Looks like you\'ve got a UTF-8 character there. Too bad, this is not supported yet. '
|
||||
+ 'We\'re working on it and hope to be ready soon! Why don\'t you '
|
||||
+ '<a href="https://duckduckgo.com/?q=cute+kitties&iar=images">enjoy some kittens</a> meanwhile?');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ export class BinToDecConverter implements Converter {
|
|||
}
|
||||
|
||||
convert(input: string): string {
|
||||
let n: number = parseInt(input, 2);
|
||||
const n: number = parseInt(input, 2);
|
||||
if (isNaN(n)) {
|
||||
throw new Error('The input seems not to be a valid binary number.');
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ export class DecToBinConverter implements Converter {
|
|||
}
|
||||
|
||||
convert(input: string): string {
|
||||
let n: number = parseInt(input, 10);
|
||||
const n: number = parseInt(input, 10);
|
||||
if (isNaN(n)) {
|
||||
throw new Error('The input seems not to be a valid integer.');
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ export class DecToHexConverter implements Converter {
|
|||
}
|
||||
|
||||
convert(input: string): string {
|
||||
let n: number = parseInt(input, 10);
|
||||
const n: number = parseInt(input, 10);
|
||||
if (isNaN(n)) {
|
||||
throw new Error('The input seems not to be a valid integer.');
|
||||
}
|
||||
|
|
|
@ -10,9 +10,9 @@ export class HexToDecConverter implements Converter {
|
|||
}
|
||||
|
||||
convert(input: string): string {
|
||||
let n: number = parseInt(input, 16);
|
||||
const n: number = parseInt(input, 16);
|
||||
if (isNaN(n)) {
|
||||
throw new Error('The input seems not to be a valid hexadecimal number.')
|
||||
throw new Error('The input seems not to be a valid hexadecimal number.');
|
||||
}
|
||||
return n.toString(10);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue