npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mihrab-methods

v1.0.2

Published

The prayer-time authorities' own calculation methods, each reproducing its published timetable to the minute: Sweden (Diyanet, as Islamiska Förbundet prints it), Diyanet worldwide, Morocco (Habous), Algeria (Ministry of Religious Affairs), Indonesia (Keme

Readme

mihrab-methods

npm checks certification

Prayer times that match the published timetable to the printed minute. Each national authority's own calculation method, worked out again from its published times and checked day by day against its timetables: 0 of

mosque to use.

npm install mihrab-methods
import { nearestPlace, timesFor } from 'mihrab-methods/diyanet'; // one authority's data, or 'mihrab-methods' for all

const { place } = nearestPlace('diyanet', 41.01, 28.98)!;  // Istanbul's district
const day = timesFor(place, '2026-10-15');                  // or { year: 2026, month: 10, day: 15 }
day.status;          // 'certified': inside the dates the method was checked over
day.clock.label;     // 'Europe/Istanbul': the clock the table prints the day in
day.times!.fajr;     // { instant: Date, printed: 'HH:MM' } — show printed, schedule on instant
day.certifiedUntil;  // the last date checked; past it, status is 'method-only'

The full API, the HTTP server and the per-authority imports are in docs/usage.md.

What is certified

| Authority | Tables matched | Places | Times checked | Off the printed minute | By the method alone | Correction entries | Checked over | |---|---|---:|---:|---:|---:|---:|---| | Sweden | Islamiska Förbundet’s tables | 107 | 59,640 | 0 | 99.966 % | 270 | 11 Oct 2026 → 19 Nov 2027 | | | Diyanet’s own tables | 159 | 1,393,794 | 0 | 99.981 % | | 1 Jan 2024 → 31 Dec 2027 | | Diyanet | its tables worldwide | 8,132 | 69,999,603 | 0 | 99.986 % | 9,118 | 1 Jan 2024 → 31 Dec 2027 | | Morocco | Habous | 164 | 75,768 | 0 | 99.122 % | 665 | 27 Aug 2026 → 11 Nov 2026 | | Algeria | Ministry of Religious Affairs | 68 | 101,184 | 0 | 99.365 % | 642 | 1 Oct 2026 → 5 Jun 2027 | | Indonesia | Kemenag | 517 | 266,772 | 0 | 99.968 % | 84 | 7 Oct 2026 → 31 Dec 2026 |

5 of 5 methods certified; 0 of 71,896,761 times off the printed minute. Last checked 18 October 2026. Generated from certification.json by scripts/readme.mjs.

"By the method alone" is the formula without its correction list. The list holds the few times the authority's own program puts a fraction of a second on the other side of a minute's rounding point: a point, a date, a prayer, a minute either way. Why that can be used freely is in docs/legal.md; what each method still leaves out is in docs/status.md.

How verification works

  1. The tables. For each authority, its own published timetables for every place it lists, every day it has published. They are not part of this repository and are not redistributed; the check reads them from MIHRAB_TABLES.
  2. The check. tools/verify.ts computes every place on every day and compares each of the six times with the printed minute, on the clock the table prints that day in. Days the table itself gets wrong (another town's times under a name, a previous year's rows) are set aside and listed in the record, so each can be judged.
  3. The record. tools/certify.ts writes certification.json: per authority, the tables checked, the times, how many are off with and without the correction list, the dates, the method's revision and the list's SHA-256.
  4. The gate. A method is certified only at 0 off. timesFor refuses an uncertified method, and says 'method-only' for a date past the checked span. Every number on this page, on the Mihrab website and in its store listings is generated from that record (scripts/readme.mjs).

Times that differ from your mosque's? Open a report with the city, the date, the prayer and the printed time.

Keeping an app current

The record and the correction lists are a feed: an app that computes a method's revision can take any newer list certified for that revision, with no release.

import { fetchLatestCorrections } from 'mihrab-methods/morocco';
const r = await fetchLatestCorrections({ authority: 'morocco' });
// 'current' | 'updated' | 'method-moved' (update the app) | 'uncertified' | 'rejected'

It takes a list only for the revision the build computes, only when it is the list the record names, and only when its SHA-256 matches. Schemas, tags as fixed addresses and the details: docs/feed.md.

More

| | | |---|---| | docs/usage.md | The API, the entry points, the HTTP server, this repository's commands and layout | | docs/methods.md | Each method in words and formulas, for ports to other languages; test/vectors.json to check one | | docs/status.md | Per method: what is certified, what was set aside, what is not yet covered | | docs/diyanet.md | What Diyanet's worldwide tables add: Isha by country, midsummer, Türkiye's points, tables on their own clocks | | docs/feed.md | certification.json and the lists as a feed: schemas, hashes, revisions, tags | | docs/legal.md | Formulas and correction lists: why this can be used freely | | CONTRIBUTING.md | Adding an authority: 100 % or nothing | | CHANGELOG.md | Each version, and what each method revision changed in the output |

The Mihrab app computes these methods on the phone; a method that improves here goes back as the same file in Mihrab's src/providers/.

Mihrab and this library are independent: not affiliated with, endorsed by or speaking for any of the authorities whose published timetables they match.

Licence

MPL-2.0. Use the library in any app, open or closed, on a phone or on a server; what the licence asks is that changes to these files — a method fitted closer to its table, a corrected point — are published under the same terms, so an improvement to a method reaches everyone. The Mihrab app stays AGPL-3.0 and includes this library as the MPL allows. Versions before 1.0.0 were AGPL-3.0-or-later.