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

1.0.12 • Public • Published

view on npm npm module downloads per month

Quran Kemenag

Al-Quran data from kemenag (https://quran.kemenag.go.id)

How to Install

npm install quran-kemenag
# or
yarn add quran-kemenag

How to Use

// in common JS
const QuranKemenag = require("quran-kemenag");

// in typescript
import QuranKemenag from "quran-kemenag";

const quran = new QuranKemenag();

// Get List of Surah
quran.getListSurah(
    keyword      // optional, search keyword for surah name
    )
    .then((data) => {
        // data handling here
    })
    .catch((error) => {
        // error handling here
    });


// Get Surah Data
const options = {
    include_verse: true,
    verses_limit: 2,
    verses_offset: 1
}
quran.getSurah(
    1,          // required, surah id or surah number
    options     // optional
    )
    .then((data) => {
        // data handling here
    });
    .catch((error) => {
        // error handing here
    })

Readme

Keywords

none

Package Sidebar

Install

npm i quran-kemenag

Weekly Downloads

2

Version

1.0.12

License

ISC

Unpacked Size

16.8 MB

Total Files

131

Last publish

Collaborators

  • subekti13