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 🙏

© 2024 – Pkg Stats / Ryan Hefner

tanzil

v0.0.18

Published

Nodejs module of Quran text and translation from http://tanzil.net

Downloads

9

Readme

tanzil

tanzil

Nodejs module of Quran text and translation from http://tanzil.net

Installation

Global installation

npm install tanzil -g 

Local installation

npm install tanzil --save

Configuration

Configuration file is on location (./lib/config.js)

  • pathTrans = path location for the translation & index files (default: './public')
  • transTextFile = translation text file (default: 'trans-id.txt') which can be changed prior to languange
  • transJSONFile = translation json file (default: 'trans-id.json') which generated by command ./bin/tanzil index
  • indexJSONFile = search index json file (default: 'index-id.json') which generated by command ./bin/tanzil index

You may modify those files to other the translation language that you want to use by following this steps:

  1. Download the translation text file (include sura & aya) from http://tanzil.net/trans
  2. Put the text file on the folder './public' and save with name you like (example: 'trans-en.txt')
  3. Modify the configuration file './lib/config.js'
  4. Generate the index file by execute cli node bin/tanzil index
  5. Run the CLI

Search Index Files

Search index file is important to be generated to get faster search response. It's using elasticlurn.js module.

Examples

Example search by 'smart' query which can be classify as query for sura, aya or text

  1. Search for Sura 113
tanzil search 112
{ '112:1': 'Katakanlah: "Dialah Allah, Yang Maha Esa.',
  '112:2': 'Allah adalah Tuhan yang bergantung kepada-Nya segala sesuatu.',
  '112:3': 'Dia tiada beranak dan tidak pula diperanakkan,',
  '112:4': 'dan tidak ada seorangpun yang setara dengan Dia".' }
  1. Search for word 'kursi'
tanzil search kursi
Result of keyword "kursi" (1):
{ '2:255': 'Allah, tidak ada Tuhan (yang berhak disembah) melainkan Dia Yang Hidup kekal lagi terus menerus mengurus (makhluk-Nya); tidak mengantuk dan tidak tidur. Kepunyaan-Nya apa yang di langit dan di bumi. Tiada yang dapat memberi syafa\'at di sisi Allah tanpa izin-Nya? Allah mengetahui apa-apa yang di hadapan mereka dan di belakang mereka, dan mereka tidak mengetahui apa-apa dari ilmu Allah melainkan apa yang dikehendaki-Nya. Kursi Allah meliputi langit dan bumi. Dan Allah tidak merasa berat memelihara keduanya, dan Allah Maha Tinggi lagi Maha Besar.' }
  1. Search for aya '71:3'
tanzil search 71:3
{ '71:3': '(yaitu) sembahlah olehmu Allah, bertakwalah kepada-Nya dan taatlah kepadaku,' }
  1. Search for ayas list divided by comma (,)
tanzil search 5:67,8:8,67:8,75:3,100:4
{ '5:67': 'Hai Rasul, sampaikanlah apa yang diturunkan kepadamu dari Tuhanmu. Dan jika tidak kamu kerjakan (apa yang diperintahkan itu, berarti) kamu tidak menyampaikan amanat-Nya. Allah memelihara kamu dari (gangguan) manusia. Sesungguhnya Allah tidak memberi petunjuk kepada orang-orang yang kafir.',
  '8:8': 'agar Allah menetapkan yang hak (Islam) dan membatalkan yang batil (syirik) walaupun orang-orang yang berdosa (musyrik) itu tidak menyukainya.',
  '67:8': 'hampir-hampir (neraka) itu terpecah-pecah lantaran marah. Setiap kali dilemparkan ke dalamnya sekumpulan (orang-orang kafir), penjaga-penjaga (neraka itu) bertanya kepada mereka: "Apakah belum pernah datang kepada kamu (di dunia) seorang pemberi peringatan?"',
  '75:3': 'Apakah manusia mengira, bahwa Kami tidak akan mengumpulkan (kembali) tulang belulangnya?',
  '100:4': 'maka ia menerbangkan debu,' }

(c) 2017 by Stardigits (aka Ciwidey Mengaji)