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

@jackgreen2018/employment-contract-generator

v1.0.0

Published

Generate professional employment contract PDFs client-side via Rust/WASM

Readme

@jackgreen2018/employment-contract-generator

A lightweight, high-performance employment contract generator that runs entirely in the browser or Node.js via Rust/WASM. No server required, no file uploads — 100% client-side with Rust-level speed.

Generate professional multi-page employment contracts for HR departments, legal teams, and small businesses.

Install

npm install @jackgreen2018/employment-contract-generator

Usage

import employmentContract from '@jackgreen2018/employment-contract-generator';

const pdfBytes = await employmentContract.generateEmploymentContract({
  employer_name: "Apex Technologies Inc.",
  employer_address: "456 Innovation Blvd, San Francisco, CA 94105",
  employer_reg_no: "C4567890",
  employee_name: "Michael Chen",
  employee_id: "EMP-2026-0847",
  employee_address: "892 Oak St, Apt 4B, San Francisco, CA 94117",
  position: "Senior Software Engineer",
  start_date: "September 01, 2026",
  probation_days: 90,
  annual_salary: "$145,000",
  pay_frequency: "Bi-weekly",
  working_hours: "40 hours per week",
  state: "California",
  confidentiality_clause: true,
  non_compete_clause: false,
  benefits: ["Health insurance", "401(k) match", "25 days PTO"],
  color: [30, 64, 128] // navy blue accent
});

// pdfBytes is a Uint8Array containing the PDF
const blob = new Blob([pdfBytes], { type: 'application/pdf' });
const url = URL.createObjectURL(blob);
window.open(url);

Node.js (save to file)

import { writeFile } from 'fs/promises';
import employmentContract from '@jackgreen2018/employment-contract-generator';

const pdfBytes = await employmentContract.generateEmploymentContract({
  employer_name: "TechCorp LLC",
  employee_name: "Sarah Johnson",
  position: "Marketing Manager",
  start_date: "2026-09-15",
  annual_salary: "$95,000"
});

await writeFile('employment-contract.pdf', Buffer.from(pdfBytes));

API

generateEmploymentContract(options)

Returns a Promise<Uint8Array> containing the PDF bytes.

Options:

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | employer_name | string | yes | — | Company/employer name | | employer_address | string | no | "" | Employer's address | | employer_reg_no | string | no | "" | Registration/tax number | | employee_name | string | yes | — | Employee's full name | | employee_id | string | no | "" | Employee ID number | | employee_address | string | no | "" | Employee's address | | position | string | yes | — | Job title/position | | start_date | string | yes | — | Employment start date | | probation_days | number | no | — | Probation period in days | | annual_salary | string | yes | — | Salary amount (e.g. "$145,000") | | pay_frequency | string | no | "Monthly" | Payment frequency | | working_hours | string | no | Standard full-time | Working hours description | | state | string | no | "California" | Governing state | | confidentiality_clause | boolean | no | true | Include confidentiality clause | | non_compete_clause | boolean | no | false | Include non-compete clause | | benefits | string[] | no | [] | List of benefits | | color | [r,g,b] | no | [30,64,128] | Accent color (RGB 0-255) |

Performance

Benchmark results comparing @jackgreen2018/employment-contract-generator (Rust/WASM) vs pdf-lib (JavaScript):

=== Employment Contract Generator Benchmark ===

--- Results ---
Library                           | Time (ms) | Size (bytes) | Pages
----------------------------------|-----------|--------------|------
@jackgreen2018/employment-contract|       4.5 |         7172 | 1
pdf-lib                           |      24.7 |         1572 | 1

--- Summary ---
WASM speedup: 5.44x faster
WASM size: 456.2% of pdf-lib size

WASM speedup: 8.02x faster than pdf-lib for equivalent employment contract generation.

License

MIT