Skip to content

Commit

Permalink
Update utils.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed Feb 9, 2021
1 parent 8ccadcd commit eeea96e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Some functions from the Blurhash JS implementation that are used for light tasks (such as getting the average color or validating if a blurhash string is valid)


export interface RGB {
/**
* The Red value component of this RGB instance. Ranges from 0 to 255.
Expand Down Expand Up @@ -50,7 +49,7 @@ function validateBlurhash(blurhash: string): void {
throw new Error(`blurhash length mismatch: length is ${blurhash.length} but it should be ${4 + 2 * numX * numY}`);
}

export function isBlurhashValid(blurhash: string): { isValid: true } | { isValid: false, errorReason: string } {
export function isBlurhashValid(blurhash: string): { isValid: true } | { isValid: false; errorReason: string } {
try {
validateBlurhash(blurhash);
} catch (error) {
Expand Down

0 comments on commit eeea96e

Please sign in to comment.