Skip to content

Commit

Permalink
refactor: remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
patsier-cms committed Nov 24, 2023
1 parent cba60e0 commit 9d5cb56
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/versions/common/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,6 @@ export async function parseJson(
}
}

export function readFileChunk(
file: File,
start: number,
chunkSize: number
): Promise<string> {
return new Promise((resolve, reject) => {
const reader = new FileReader()

reader.onload = () => {
resolve(reader.result as string)
}

reader.onerror = (e) => {
reader.abort()
reject(e)
}

const blob = file.slice(start, start + chunkSize)
reader.readAsText(blob)
})
}

export function errorObjectToValidationError(
error: ErrorObject
): ValidationError {
Expand Down

0 comments on commit 9d5cb56

Please sign in to comment.