typing-speed-test-api
Version:
A simple Node.js API to calculate typing speed and accuracy based on user input.
31 lines (19 loc) • 890 B
Markdown
This is a simple Node.js API that calculates typing speed in Words Per Minute (WPM) and accuracy percentage based on user input. It utilizes Express.js to handle HTTP requests.
Features
Calculate WPM: Determines the number of words typed per minute.
Calculate Accuracy: Evaluates the percentage of correctly typed words compared to the original text.
Prerequisites
1-Node.js (version 14 or higher)
2-npm (comes with Node.js)
## 📥 Installation
```sh
const { typing_speed_test } = require("typing-speed-test-api");
const {original, typed, timeTaken}=req.body;
const result = await typing_speed_test(original,typed,timeTaken);
exp1
{
"original": "Here's a simple Typing Speed Test API built in Node.js using Express .",
"typed": "Here's a simple Typing Speed Test API built in Node.js using ",
"timeTaken": 30
}