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

ielts-writing-tools

v0.1.0

Published

Zero-dependency TypeScript utilities and CLI for IELTS Writing word counts, structure checks, repetition analysis, and score calculations.

Readme

ielts-writing-tools

CI MIT license

Zero-dependency TypeScript utilities and a command-line tool for deterministic IELTS Writing checks.

Built and maintained by IELTS Writing Checker, an independent practice tool for estimated scores, criterion-level feedback, and inline corrections.

Features

  • Practical English word counting with configurable hyphen handling
  • Task 1 and Task 2 minimum-word checks
  • Paragraph and sentence statistics
  • Repeated content-word and phrase detection
  • Four-criterion task score calculation
  • Combined Writing score calculation with Task 2 weighted twice
  • TypeScript declarations and an ESM API
  • A CLI for local files and standard input
  • No runtime dependencies, network requests, or essay uploads

This package performs deterministic structural checks. It does not estimate a score from essay text.

Install

npm install ielts-writing-tools

Node.js 18 or newer is required.

Quick start

import { analyzeEssay } from "ielts-writing-tools";

const result = analyzeEssay(
  `Some people believe public transport should be free.

This essay discusses the possible benefits and drawbacks.`,
  { task: 2 },
);

console.log(result.wordCount);
console.log(result.requirements.wordsNeeded);
console.log(result.structure.paragraphCount);
console.log(result.repeatedWords);

Word counting

import { countWords, tokenizeWords } from "ielts-writing-tools";

countWords("A well-written response doesn't need inflated language.");
// 7

tokenizeWords("Long-term planning", { hyphenatedWords: "separate" });
// ["Long", "term", "planning"]

Hyphenated compounds count as one word by default. Set hyphenatedWords to "separate" when a different convention is required.

Task requirements

import { checkTaskRequirements } from "ielts-writing-tools";

checkTaskRequirements("A short response.", 1);
// {
//   task: 1,
//   minimumWordCount: 150,
//   wordCount: 3,
//   meetsMinimumWordCount: false,
//   wordsNeeded: 147
// }

The package uses 150 words for Task 1 and 250 words for Task 2.

Score calculations

import {
  calculateTaskScore,
  calculateWritingScore,
} from "ielts-writing-tools";

calculateTaskScore([6.5, 7, 6, 6.5]);
// { raw: 6.5, rounded: 6.5 }

calculateWritingScore({
  task1Score: 6,
  task2Score: 7,
});
// { raw: 6.666..., rounded: 6.5 }

Accepted input scores range from 0 to 9 in half-point increments. A single task calculation requires exactly four criterion scores.

Repetition analysis

import {
  findRepeatedPhrases,
  findRepeatedWords,
} from "ielts-writing-tools";

findRepeatedWords(essay, {
  minimumOccurrences: 3,
  minimumLength: 4,
  limit: 10,
});

findRepeatedPhrases(essay, {
  phraseLength: 2,
  minimumOccurrences: 2,
  limit: 10,
});

Repetition results are descriptive counts, not quality judgments. Common English function words are excluded from repeated-word results.

CLI

Analyze a local file:

npx ielts-writing-tools essay.txt --task 2

Read from standard input:

cat essay.txt | npx ielts-writing-tools - --task 2

Return JSON:

npx ielts-writing-tools essay.txt --task 1 --json

See every option:

npx ielts-writing-tools --help

Privacy

All analysis runs locally. The package does not make network requests or send essay text anywhere.

For a full AI-assisted practice review with estimated scores and inline corrections, use IELTS Writing Checker.

Development

npm install
npm test
npm run check

npm run check compiles the package, runs the test suite, and checks the files that would be published.

Disclaimer

IELTS is a trademark of its respective owner. This project is independent and is not affiliated with, approved by, or endorsed by IELTS or its owners. Calculations and checks are provided for practice and software-development purposes only.

Useful official references:

License

MIT