myquran
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i myquran

Weekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

8.46 kB

Total Files

10

Last publish

Collaborators

  • ray_1337