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

@vikhram-s/indianconstitution-js

v0.2.0

Published

A JavaScript module for accessing and managing Constitution data.

Readme

@vikhram-s/indianconstitution-js (v0.2.0)

A robust JavaScript library designed to provide seamless access to the Constitution of India. This module enables developers to retrieve articles, explore summaries, perform keyword searches, and more, leveraging a comprehensive dataset embedded within the IndianConstitution class.

npm version License Maintained Node.js Downloads GitHub Issues

Installation

Install the library via npm to integrate it into your Node.js project:

npm install @vikhram-s/indianconstitution-js

Features

  • Comprehensive Access: Retrieve the full text of the Constitution of India, including the Preamble and individual articles.
  • Article Retrieval: Fetch detailed information or concise summaries for any article by its number.
  • Search Capabilities: Perform keyword-based searches across article content or filter by titles.
  • Utility Functions: Count total articles and explore the dataset with ease.

Usage

Get started with @vikhram-s/indianconstitution-js using these examples:

Quick Example

const { getArticle, IndianConstitution } = require('@vikhram-s/indianconstitution-js');

// Fetch an article directly
console.log(getArticle(14)); // "Article 14: Equality before law..."

// Use the class for advanced access
const india = new IndianConstitution();
console.log(india.preamble()); // "We, the people of India..."

Detailed Node.js Example

const { IndianConstitution } = require('@vikhram-s/indianconstitution-js');

// Instantiate the class
const india = new IndianConstitution();

// Access the Preamble
console.log(india.preamble());

// Retrieve article details
console.log(india.getArticle(14)); // "Article 14: Equality before law..."

// List all articles
console.log(india.articlesList());

// Search by keyword
console.log(india.searchKeyword('equality'));

// Get an article summary
console.log(india.articleSummary(21)); // "Article 21 - Protection of life..."

// Count total articles
console.log(india.countArticles());

// Search by title keyword
console.log(india.searchByTitle('Fundamental'));

API Reference

| Function | Description | |----------|-------------| | preamble() | Returns the Preamble of the Constitution of India. | | getArticle(number) | Retrieves full details of the specified article by number. | | articlesList() | Lists all articles with their titles in a readable format. | | searchKeyword(word) | Searches for a keyword across article titles and descriptions. | | articleSummary(num) | Provides a concise summary of the specified article. | | countArticles() | Returns the total number of articles in the Constitution. | | searchByTitle(title) | Finds articles matching a keyword in their titles. |

Development

This library is actively maintained. We welcome contributions, bug reports, and feature suggestions via GitHub Issues. For usage terms, refer to the LICENSE file.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for full details.

Data Source

The Constitution data is meticulously compiled from publicly available, authoritative sources to ensure accuracy and reliability.

Developer Information

Copyright

© 2025 Vikhram S. All rights reserved.