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)
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
}