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

@islamicnetwork/sdk

v0.1.4

Published

Typed JavaScript SDK for Islamic Network APIs (AlAdhan + AlQuran).

Readme

Islamic Network SDK (JavaScript/TypeScript)

Typed SDK for the Islamic Network APIs (AlAdhan + AlQuran) designed to work in React, Next.js, and React Native.

Supported APIs:

  • AlAdhan (prayer times, Islamic calendar, qibla, Asma Al Husna)
  • AlQuran (surahs, ayahs, sections, editions, search, sajda, meta)
  • Boycott Israeli (companies, categories, search)
  • Sermons (sources, languages, year/month sermon feeds)

Installation

npm install @islamicnetwork/sdk
# or
pnpm add @islamicnetwork/sdk
# or
yarn add @islamicnetwork/sdk

Usage

AlAdhan

import { AlAdhanClient, AlAdhanRequests } from "@islamic-network/sdk";

const client = AlAdhanClient.create();

const request = new AlAdhanRequests.DailyPrayerTimesByCoordinatesRequest(
  "01-01-2025",
  51.5194682,
  -0.1360365,
  new AlAdhanRequests.PrayerTimesOptions()
);

const response = await client.prayerTimes().dailyByCoordinates(request);

console.log(response.data.timings.Fajr);
import { AlAdhanClient, AlAdhanRequests } from "@islamic-network/sdk";

const client = AlAdhanClient.create();

const qibla = await client.qibla().direction(
  new AlAdhanRequests.QiblaDirectionRequest(19.071017570421, 72.838622286762)
);

console.log(qibla.data.direction);
import { AlAdhanClient, AlAdhanRequests } from "@islamic-network/sdk";

const client = AlAdhanClient.create();

const asma = await client
  .asmaAlHusna()
  .byNumber(new AlAdhanRequests.AsmaAlHusnaByNumberRequest([1, 2, 3]));

console.log(asma.data[0]?.en.meaning);

Qibla Compass (Binary)

import { AlAdhanClient, AlAdhanRequests } from "@islamic-network/sdk";

const client = AlAdhanClient.create();
const image = await client
  .qibla()
  .compass(new AlAdhanRequests.QiblaCompassRequest(19.071017570421, 72.838622286762));

// Browser/React: build a Blob URL
const blob = new Blob([image.body], { type: image.contentType });
const url = URL.createObjectURL(blob);

AlQuran

import { AlQuranClient, AlQuranRequests } from "@islamic-network/sdk";

const client = AlQuranClient.create();

const ayah = await client.ayahByNumber(new AlQuranRequests.AyahByNumberRequest(5));
console.log(ayah.data.text);

const editions = await client.editions(new AlQuranRequests.EditionListRequest(null, "text", "en"));
console.log(editions.data[0]?.identifier);

Boycott Israeli

import { BoycottIsraeliClient, BoycottIsraeliRequests } from "@islamic-network/sdk";

const client = BoycottIsraeliClient.create();

const categories = await client.categories(
  new BoycottIsraeliRequests.CategoriesRequest(
    new BoycottIsraeliRequests.PaginationOptions({ limit: 5 })
  )
);

const companies = await client.search(
  new BoycottIsraeliRequests.SearchRequest(
    "food",
    new BoycottIsraeliRequests.PaginationOptions({ limit: 2 })
  )
);

console.log(categories.data[0]?.name);
console.log(companies.data[0]?.name);

Sermons

import { SermonsClient, SermonsRequests } from "@islamic-network/sdk";

const client = SermonsClient.create();

const sources = await client.sources(new SermonsRequests.SourcesRequest());
const languages = await client.languages(new SermonsRequests.LanguagesRequest());

const months = await client.yearSermons(
  new SermonsRequests.YearSermonsRequest("uae-awqaf", 2021, SermonsRequests.SermonType.Friday)
);

const month = await client.monthSermons(
  new SermonsRequests.MonthSermonsRequest("uae-awqaf", 2021, 7, SermonsRequests.SermonType.Friday)
);

console.log(sources[0]?.handle);
console.log(languages[0]?.code);
console.log(months[0]?.sermons[0]?.title);
console.log(month.month.number);

Configuration

Both clients accept the same options:

import { AlAdhanClient } from "@islamic-network/sdk";

const client = AlAdhanClient.create({
  baseUrl: "https://api.aladhan.com/v1",
  defaultHeaders: { "X-App": "my-app" },
  defaultQuery: { iso8601: true },
  timeoutMs: 10_000,
  userAgent: "my-sdk-client",
  fetch: globalThis.fetch // optional, provide for custom environments
});

Notes

  • The SDK uses the global fetch implementation by default. Provide a custom fetch for non-standard environments.
  • Prayer timings preserve API field names (e.g., Fajr, Dhuhr, Firstthird).
  • Qibla compass requests return binary image data with a content type.
  • Integration tests call live API endpoints and retry once on 429 or network errors.

Testing

npm test

Integration tests call the live APIs. When a 429 or timeout occurs, the client retries once after 1 second.