myquran
v1.0.1
Published
A simple API wrapper for api.myquran.com
Downloads
3
Maintainers
Readme
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.