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

plagx-preflight

v0.1.3

Published

Plagx Preflight: a free draft checker for essays and papers. Word count, citation and reference list checks, punctuation, basic grammar and readability suggestions. Runs offline. By Plagiarism Checker X.

Readme

Plagx Preflight for JavaScript

A free academic writing tool by Plagiarism Checker X.

Plagx Preflight for JavaScript is a free, open-source draft checker for Node.js and the browser. Use it as an essay checker before you submit: it checks the word count and structure, matches in-text citations against the reference list, and gives punctuation and basic grammar suggestions plus readability stats.

  • No dependencies, works offline: your text never leaves the machine
  • Node.js 18+, modern browsers, Deno and Bun
  • APA and MLA citation checks
  • Command line with JSON output and CI-friendly exit codes
  • TypeScript types included

Try the live demo → · Open in Observable

Developer downloads: npm · jsDelivr

Plagx Preflight is a free academic writing utility by Plagiarism Checker X. It checks length, structure, references, punctuation and basic grammar, and every result is a suggestion. Plagiarism checking and AI-generated text detection are available in Plagiarism Checker X, linked at the end of this page.

Install

npm install plagx-preflight

Quick start

import { checkDraft } from 'plagx-preflight';

const result = checkDraft(text, { minWords: 1500, maxWords: 2000, style: 'apa' });

result.stats;
// { words: 1620, sentences: 84, paragraphs: 12, characters: 9811, readingTimeMinutes: 9, fleschReadingEase: 48.2 }

result.issues[0];
// { level: 'warning', code: 'repeated-word', message: 'Suggestion: "the the" looks like a repeated word.',
//   start: 312, end: 319, line: 5, column: 14, text: 'the the', suggestion: 'the' }

Command line

npx plagx-preflight check essay.txt --min-words 1500 --max-words 2000 --style apa
npx plagx-preflight check essay.md --json
npx plagx-preflight stats essay.txt
cat essay.txt | npx plagx-preflight check -

| Option | Meaning | |---|---| | --min-words <n>, --max-words <n> | Word limits (reference list excluded) | | --style apa\|mla | Citation style (default apa) | | --checks <list> | Comma-separated check groups | | --require-heading <name> | Required heading, repeatable | | --strict | Count warnings as failures | | --json | JSON output |

Exit codes: 0 no errors, 1 errors found (with --strict, warnings too), 2 usage or input error. Accepts .txt and .md.

API

checkDraft(text, options) returns { stats, errors, warnings, infos, issues }. Issues are sorted by position. start and end are UTF-16 offsets into text.

| Option | Default | | |---|---|---| | minWords, maxWords | none | Word limits | | style | 'apa' | 'apa' or 'mla' | | checks | all except 'passive-voice' | length, references, punctuation, grammar, passive-voice | | requiredHeadings | [] | e.g. ['Introduction', 'Conclusion'] |

Helpers: countWords(text), splitSentences(text), findCitations(text, style), VERSION, CHECKS.

Checks

| Group | Codes | Level | |---|---|---| | Length & structure | word-count-low, word-count-high, long-sentence (over 40 words), long-paragraph (over 250 words), single-sentence-paragraph, missing-heading | warning / info | | References | citation-no-reference, missing-reference-section, reference-not-cited, et-al-format | error / warning | | Punctuation | unmatched-quote, unmatched-bracket, double-space, space-before-punctuation, missing-space-after-punctuation, repeated-punctuation, mixed-quote-styles | warning / info | | Grammar | repeated-word, a-an, sentence-capital, lowercase-i, common-confusion, passive-voice (off by default) | warning / info |

Good to know

  • Every result is a suggestion. The grammar rules are deliberately conservative, so they miss some mistakes rather than flag correct text.
  • The reference list starts at a heading such as References, Bibliography or Works Cited. It is excluded from the word count and from the punctuation and grammar checks.

Development

npm test          # unit, CLI and parity tests
npm run parity    # regenerate parity/expected.json, the contract for other language ports
npm run docs      # copy src/ into docs/lib for the demo

Plagx Preflight - Free Draft & Grammar Checker

An open-source writing utility for students, researchers and developers. Check length, structure, citations, punctuation and basic grammar before you submit.

Developed by Plagiarism Checker X.

Plagx Preflight gives writing suggestions; it does not detect plagiarism or AI-generated text. For full document checks, explore Plagiarism Checker X and its AI Content Detector.

License

MIT © Plagiarism Checker X.