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

quran-promise

v0.0.12

Published

ES2016 async/await (promise) enabled node module for the Holy Quran.

Downloads

7

Readme

quran-promise

NPM version NPM downloads Build Status Coverage Status Dependency Status

ES2016 async/await (promise) enabled node module for the Holy Quran. Uses the Tanzil corpus: http://tanzil.net.

Using this Module

For detailed documentation, and code samples for how to use this module in your app or service please visit: https://tjaffri.github.io/quran-promise/.

Developing this Module

The rest of this README describes how you can clone this repo to get the source to develop/test locally. Contributions are very welcome!

Environment Setup

First, set up your dev tools and node.js:

  1. Set up your favourite IDE. We use VSCode: https://code.visualstudio.com/ and you can configure this IDE as follows:
  2. Follow this useful article about JavaScript development in VSCode here, including how to debug.
  3. Set up linting in VSCode. You can install eslint globally via npm install -g eslint and then install the VSCode eslint extension. See here for more info.
  4. Install Node.js (version 6.x or higher)
  5. Install Git: https://git-scm.com/download

Next, clone the repo and install dependencies.

$ git clone https://github.com/tjaffri/quran-promise
$ cd quran-promise
$ npm install

The quran data is in a sqllite database, and a known good version is checked in. Optionally, ff you want to re-generate it, please run:

npm run gendb

Finally, if you're new to Next Generation JavaScript you might want to brush up on the following resources:

  1. ES6 Training Course by Wes Bos
  2. You Don't Know JS: ES6 & Beyond by Kyle Simpson (Dec, 2015)
  3. Understand promises before you start using async/await

Testing, Running and Publishing

Run one, or a combination of the following commands to lint and test your code:

$ npm run lint          # Lint the source code with ESLint (runs as part of CI build)
$ npm run lint:fix      # Lint the source code with ESLint, using the --fix option to auto-fix some issues
$ npm test              # Run unit tests with Mocha
$ npm run test:watch    # Run unit tests with Mocha, and watch files for changes
$ npm run test:cover    # Run unit tests with code coverage by Istanbul (runs as part of CI build)
$ npm run coveralls     # Report code coverage to coveralls.io (runs as part of CI build)

To launch the documentation site, run:

$ npm install -g easystatic
$ npm run start:docs    # Launches the docs site locally for testing
$ npm run publish:docs  # Optionally, publishes the doc site to GitHub pages (runs as part of CI build)

Finally, to build and publish to npm, you need to run:

npm run build           # Builds the source, transpiling via babel (runs as part of CI build)
cd dist                 # Publish from the dist folder
npm publish             # Requires credentials allowed to publish to npm

Credits

With thanks, this module acknowledges and depends on the following resources:

  1. Tanzil project: http://tanzil.net/
  2. EveryAyah: http://everyayah.com/data/status.php
  3. The Babel Starter Kit, used to scaffold the initial version of this module: https://github.com/kriasoft/babel-starter-kit/

Finally, a HUGE callout to the similar npm module https://www.npmjs.com/package/quran. We ended up completely rewriting it, to support ES2016 async/await (promises), but got inspired by it. We also tried to keep the calling semantics as compatible as possible to aid anyone who might be migrating from that module.

License

MIT © 2016 Axis, the Information Professionals.