npm.io
1.0.1 • Published 3 years ago

myquran

Licence
MIT
Version
1.0.1
Deps
1
Size
8 kB
Vulns
12
Weekly
0

api.myquran.com

This is an unofficial lightweight (~5kB) API wrapper of api.myquran.com, with TypeScript typings.

Examples

// JavaScript
const { findPrayCityByKeyword } = require("myquran");
const city = await findPrayCityByKeyword("depok");
console.log(city.data.lokasi); // "KOTA DEPOK"
// TypeScript
import { getTafsirByID } from "myquran";
const tafsir = await getTafsirByID("1337");
console.log(tafsir.data[0].text); // "Dan ada pula orang lain yang berada di sekeliling ..."

Features

  • TypeScript supports.
  • Async-await promise.
  • Simple error handling. Simply will return as null instead of { status: false, message: string }

Documentations

Everything is picked up based on api-myquran.com docs.

LICENSE

MIT

Keywords