Skip to main content
Home

@octo/thoth@0.2.3

latest

`Thoth` is full-text search on Deno KV.

This package works with DenoIt is unknown whether this package works with Cloudflare Workers, Node.js, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
94%
Published
a year ago (0.2.3)

Thoth

Thoth is full-text search on Deno KV.

Docs

Documentation is here.

thoth-doc.deno.dev

Usage

import { createThothClient } from "jsr:@octo/thoth";

const kv = await Deno.openKv();
const thoth = createThothClient(kv, 3);

await thoth.flash();

await thoth.register(["ABCDEFG", "abcdefg"], "000001");
await thoth.register(["あいうえお", "aiueo"], "000002");
await thoth.register(["ABCDEFGABCDEFG", "abcdefgabcdefg"], "000003");

console.log(await thoth.search("ABC"));
// => { "000001": { "0": [ 0 ] } }

console.log(await thoth.search("AC"));
// => {}

console.log(await thoth.search("ef"));
// => { "000001": { "1": [ 4 ] }, "000003": { "1": [ 4, 11 ] } }

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@octo/thoth

Import symbol

import * as thoth from "@octo/thoth";
or

Import directly with a jsr specifier

import * as thoth from "jsr:@octo/thoth";

Add Package

pnpm i jsr:@octo/thoth
or (using pnpm 10.8 or older)
pnpm dlx jsr add @octo/thoth

Import symbol

import * as thoth from "@octo/thoth";

Add Package

yarn add jsr:@octo/thoth
or (using Yarn 4.8 or older)
yarn dlx jsr add @octo/thoth

Import symbol

import * as thoth from "@octo/thoth";

Add Package

npx jsr add @octo/thoth

Import symbol

import * as thoth from "@octo/thoth";

Add Package

bunx jsr add @octo/thoth

Import symbol

import * as thoth from "@octo/thoth";