Skip to content

Instantly share code, notes, and snippets.

@impaachu
impaachu / OCR.html
Last active November 17, 2021 17:11
OCR using Tesseract.js library
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src='https://unpkg.com/[email protected]/dist/tesseract.min.js'></script>
</head>
@impaachu
impaachu / db.js
Created December 13, 2019 00:16
IndexedDB wrapper functions with promises
export const appDB = {
DB_NAME: "appDB",
DB_VERSION: 1,
DB_STORE_NAME: "appDBStorage",
DB_STORE_KEY_PATH: "key",
instance: {},
open: () => {
let promise = new Promise((resolve, reject) => {
var request = window.indexedDB.open(appDB.DB_NAME, appDB.DB_VERSION);