open-index/open-npm huggingface dataset:
npm package: @hudabook/qur
Description: A web decoder for Quran File Format.
Latest version: 0.0.4

## Quran File Format Decoder

A web decoder for Quran File Format.

## Table of Contents

- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage](#usage)
- [API](#api)
- [Contributing](#contributing)
- [Specifications](#specs)
- [License](#license)

## Prerequisites

This implementation is intended for web browsers, esm and cjs builds are available.

## Installation

```sh
npm install @hudabook/qur --save
```

## Usage

```js
import { QuranFileFormat } from '@hudabook/qur';

// make sure your server can respond to the following GET request
const response = await fetch('uthmani.qur');
const buffer = await response.arrayBuffer();

const qur = new QuranFileFormat(buffer);
const suraAlFatiha = qur.sura(1); // Sura Reference Starts at 1

if (suraAlFatiha.status === 'success') {
    const { value } = suraAlFatiha;
    const content = value.toString();
    console.log(content); // logs sura Al Fatiha content to console
}
```
## API

```ts
interface QuranFileFormat {
    new(buffer: ArrayBuffer): QuranFileFormat;
    sura(sura_ref: number): Result<QuranSura>;
}

interface QuranSura {
    toString(): string
}

interface Result<Value> {
    status: 'success' | 'error'
    value?: Value
    error?: string
}
```

## Contributing

Contributions are welcome, Feel free to raise a PR [here](https://github.com/solomancode/qur-specs/pulls)

## Specifications

Quran File format specifications can be found [here](https://github.com/solomancode/qur-specs)

## License

This package is distributed under MIT license.
npm package: @hudabook/qvf-decoder
Description: This library was generated with [Nx](https://nx.dev).
Latest version: 0.0.2

# qvf_web_decoder

This library was generated with [Nx](https://nx.dev).

## Building

Run `nx build qvf_web_decoder` to build the library.

## Running unit tests

Run `nx test qvf_web_decoder` to execute the unit tests via [Vitest](https://vitest.dev/).
npm package: @hudabook/qvf-svg-renderer
Description: ## Features - 🍃 Efficent, Smaller than Regulat SVG text Format - 🚀 Progressive, Load On Demand - ⚡ Easy to Use
Latest version: 0.0.5

# Quran Svg Renderer

## Features
- 🍃 Efficent, Smaller than Regulat SVG text Format
- 🚀 Progressive, Load On Demand
- ⚡ Easy to Use

## Install

Run `npm install @hudabook/qvf-svg-renderer`

## How To Use

```ts
import { QuranSvgRenderer, SvgRenderResult } from "@hudabook/qvf_svg_renderer";

// Data is a list of .qvf files 
// Uthmani Quran words can be found here: https://github.com/solomancode/qur-specs/tree/master/qvf/uthmani
// Files can be loaded by dev server or any static http server
function renderAyah(data: ArrayBuffer[], fontSize = 32) {
    let svg = new QuranSvgRenderer();
    const render = svg.render(data, fontSize);
    for (const result of render) {
        renderSvg(result)  
    }
}

function renderSvg(result: SvgRenderResult) {
    const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
    svg.setAttribute('width', result.width);
    svg.setAttribute('height', result.height);
    svg.setAttribute('viewBox', result.viewBox);
    for (const path of result.paths) {
        const element = document.createElementNS("http://www.w3.org/2000/svg", "path");
        element.setAttribute('d', path.d);
        svg.appendChild(element);
    }
    document.body.appendChild(svg);
}
```

#### A working React example can be found here: 
[https://github.com/solomancode/qur-specs/tree/master/demo](https://github.com/solomancode/qur-specs/tree/master/demo)

### Project Specs can be found here:
[https://github.com/solomancode/qur-specs/tree/master](https://github.com/solomancode/qur-specs/tree/master)