quran-meta
    Preparing search index...

    Function customizeRiwaya

    • Creates riwaya data that reuses a built-in riwaya but replaces some of its lists, for example a different mushaf page layout (15-line Indo-Pak, Madinah 1405, ...).

      The counts in meta (numPages, numJuzs, ...) are recalculated from the new lists and the result is checked with validateRiwayaData.

      Boundary lists use the same layout as the built-in ones: [0, firstAyahIdOfPart1, firstAyahIdOfPart2, ..., numAyahs + 1].

      Type Parameters

      Parameters

      • base: T

        Built-in riwaya data to start from, e.g. HafsLists

      • overrides: RiwayaListOverrides

        Lists to replace

      Returns T

      New riwaya data, usable with QuranRiwaya.create and the functional API

      Error If the resulting data is inconsistent, listing every problem found

      import { QuranRiwaya, customizeRiwaya, getListsOfRiwaya } from "quran-meta"

      const indoPak = customizeRiwaya(getListsOfRiwaya("Hafs"), { PageList: myIndoPakPageList })
      const quran = QuranRiwaya.create(indoPak)
      quran.meta.numPages // length of your page list
      quran.findPage(2, 255)