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

@tekromancy/grant_utils

v0.1.4

Published

Enterprise-grade utilities, models, parsers, and Git/PR collaboration workflows for institutional grantwriting, non-profits, and cooperatives

Readme

@tekromancy/grant_utils

Enterprise-grade TypeScript models, parsers, KPI calculators, RFC 5545 iCalendar generators, and Git/PR collaboration workflows for institutional grantwriting, non-profits, and cooperatives.

npm version License: MIT TypeScript


🌟 Overview

@tekromancy/grant_utils provides the computational and schema foundation for building Git-first grantwriting hubs, applications, and dashboards.

By treating funding opportunities as structured code (Markdown with YAML frontmatter + RFC 5545 iCalendar), organizations can version control their applications, compute pipeline KPIs in real time, audit match-funding requirements, and submit proposed edits via unified Git pull requests.


📦 Installation

# Using pnpm (recommended)
pnpm add @tekromancy/grant_utils

# Using npm
npm install @tekromancy/grant_utils

# Using yarn
yarn add @tekromancy/grant_utils

🚀 Key Modules & Features

1. Markdown Frontmatter Parsing & Verification

Parse and serialize grant opportunities with strict typing:

import { parseGrantMarkdown, serializeGrantMarkdown } from '@tekromancy/grant_utils';

const fileContent = `---
id: usda_rbdg_2027
title: "USDA Rural Business Development Grant"
funder: "USDA Rural Development"
amount: 150000
amountFormatted: "$150,000"
deadline: "2027-04-30"
matchPercentage: 0
status: "Drafting"
---

# Scope of Work
Executive summary and project milestones...
`;

const { metadata, content } = parseGrantMarkdown(fileContent);
console.log(metadata.title); // "USDA Rural Business Development Grant"
console.log(metadata.amount); // 150000

2. RFC 5545 iCalendar Parsing & Generation

Generate standards-compliant calendar files compatible with Google Calendar, Apple Calendar, and Outlook:

import { generateIcsString, parseIcsEvents, GrantCalendarEvent } from '@tekromancy/grant_utils';

const events: GrantCalendarEvent[] = [
  {
    uid: '[email protected]',
    title: 'DEADLINE: USDA RBDG Proposal Submission',
    summary: 'DEADLINE: USDA RBDG Proposal Submission',
    description: 'Submit final application via grants.gov portal.',
    date: '2027-04-30',
    category: 'Federal',
    amount: '$150,000'
  }
];

const icsOutput = generateIcsString(events);
// Produces valid VCALENDAR / VEVENT blocks with alarms and formatting

3. Pipeline KPIs & Financial Aggregation

Calculate pipeline totals, target attainment, cost-share burdens, and deadline status:

import {
  calculateTotalPipeline,
  calculateSecuredFunding,
  calculateMatchRequirements,
  calculatePipelinePacing,
  getDeadlineStatus
} from '@tekromancy/grant_utils';

const grants = [ /* Array of GrantOpportunity objects */ ];

const totalPipeline = calculateTotalPipeline(grants);
const pacing = calculatePipelinePacing(totalPipeline, 1000000); // Target: $1M
console.log(`Pipeline: $${pacing.pipelineTotal.toLocaleString()} (${pacing.percentageOfTarget.toFixed(1)}% of target)`);

const matchSummary = calculateMatchRequirements(grants);
console.log(`Total match funding required: $${matchSummary.totalMatchRequired.toLocaleString()}`);

4. Unified Red/Green Diff Engine

Compute precise line diffs for grant applications and markdown documentation:

import { computeLineDiff } from '@tekromancy/grant_utils';

const originalText = "Requesting $100,000 for equipment purchase.";
const modifiedText = "Requesting $120,000 for equipment purchase and contractor fees.";

const diff = computeLineDiff(originalText, modifiedText);
console.log(`Changes: +${diff.addedCount} / -${diff.removedCount}`);

5. Git & Pull Request Automation

Automate multi-platform PR workflows across GitHub, GitLab, and Codeberg:

import {
  generateBranchName,
  generatePrTitle,
  generatePrBody,
  createGitHubPullRequest
} from '@tekromancy/grant_utils';

const branch = generateBranchName('USDA RBDG 2027', 'budget-update');
// "grants/usda-rbdg-2027-budget-update"

const prBody = generatePrBody({
  grantTitle: 'USDA RBDG 2027',
  summary: 'Updated contractor line-item budget to reflect prevailing wage rates',
  author: 'Jane Doe <[email protected]>',
  changes: ['Added contractor line item', 'Updated match narrative']
});

6. Node.js Local File System Helpers

For CLI utilities, build scripts, and local desktop runners:

import { readLocalMarkdownFile, saveLocalMarkdownFile, getLocalAuthToken } from '@tekromancy/grant_utils/node';

const rawContent = readLocalMarkdownFile(process.cwd(), 'data/grants/01_grant.md');

📚 Documentation


🛠️ Contributing & Development

# Clone the repository
git clone [email protected]:Tekromancy/grant_utils.git
cd grant_utils

# Install dependencies
pnpm install

# Build all packages and run tests
pnpm run build
pnpm run test

# Run example grant hub demo CLI
pnpm run example

📄 License

MIT © Tekromancy & Austin Cooperative Business Foundation