An open API service indexing awesome lists of open source software.

https://github.com/apacheli/urbanary

A Deno library for Urban Dictionary
https://github.com/apacheli/urbanary

deno dictionary library typescript urban-dictionary

Last synced: about 2 months ago
JSON representation

A Deno library for Urban Dictionary

Awesome Lists containing this project

README

          

# urbanary

A library that gets definitions from
[Urban Dictionary](https://www.urbandictionary.com/) because it's the world's
most trusted internet dictionary.

## Example

Make sure to enable `--allow-net`.

```ts
import * as urbanary from "https://deno.land/x/urbanary/mod.ts";

const term = prompt("term to define:");
if (!term) {
throw new Error("bad term!");
}

const definitions = await urbanary.define(term);
console.log(definitions);
```

## Functions

- `autocomplete(term: string)`
- `autocompleteExtra(term: string)`
- `define(term: string, page?: number)`
- `defineDefid(defid: number)`
- `random()`
- `uncacheable(ids: number[])`
- `wordsOfTheDay(page?: number)`