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

@pramit.dev/sdk

v0.3.0

Published

Official Node.js SDK for the Pramit India Compliance API

Readme

@pramit.dev/sdk

Official Node.js SDK for the Pramit India Compliance API.

Install

npm install @pramit.dev/sdk

Quick Start

import { Pramit } from "@pramit.dev/sdk";

const pramit = new Pramit({ apiKey: "pk_live_your_key_here" });

// Analyze a contract (async — waits for result)
const analysis = await pramit.analyzeContractSync(contractText);
console.log(analysis.overall_risk_score); // "LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
console.log(analysis.flagged_clauses);

// Extract invoice data (async — waits for result)
const invoice = await pramit.extractInvoiceSync(base64Data, "image/png");
console.log(invoice.total);
console.log(invoice.line_items);
console.log(invoice._meta?.state_analysis); // CGST/SGST vs IGST

// GSTIN lookup (instant, cached)
const { data } = await pramit.lookupGstin("29AABCT1234F1ZP");
console.log(data.legal_name);
console.log(data.state); // "Karnataka"

Async Pattern

AI endpoints are async. The SDK handles polling for you:

// Option 1: Fire and forget — use webhooks
const { jobId } = await pramit.analyzeContract(text, {
  webhookUrl: "https://your-app.com/webhooks/pramit",
});

// Option 2: Sync wrapper — blocks until result
const result = await pramit.analyzeContractSync(text);

// Option 3: Manual polling
const { jobId } = await pramit.analyzeContract(text);
const job = await pramit.waitForJob(jobId, {
  pollInterval: 2000,
  maxAttempts: 30,
});

Error Handling

import { Pramit, PramitError } from "@pramit.dev/sdk";

try {
  const result = await pramit.analyzeContractSync(text);
} catch (err) {
  if (err instanceof PramitError) {
    console.error(err.code);      // "RATE_LIMITED", "INVALID_INPUT", etc.
    console.error(err.status);     // 429, 400, etc.
    console.error(err.requestId);  // for support
  }
}

API Reference

new Pramit(config)

| Option | Type | Default | Description | |--------|------|---------|-------------| | apiKey | string | required | Your Pramit API key | | baseUrl | string | https://api.pramit.dev | API base URL | | timeout | number | 30000 | Request timeout in ms |

Methods

| Method | Returns | Description | |--------|---------|-------------| | analyzeContract(text, options?) | { jobId } | Submit contract for analysis | | analyzeContractSync(text, options?) | ContractAnalysis | Submit and wait for result | | extractInvoice(base64, mime, options?) | { jobId } | Submit invoice for extraction | | extractInvoiceSync(base64, mime, options?) | InvoiceExtraction | Submit and wait for result | | lookupGstin(gstin) | { data, cached } | GSTIN details lookup | | getJob(jobId) | Job | Check job status | | waitForJob(jobId, options?) | Job | Poll until complete |

Links