1.0.0 • Published 3 years ago
typing-stats.js v1.0.0
typing-stats.js
A package that takes two texts and generates WPM and accuracy.
Documentation
/**
* Generates WPM and accuracy.
* @param {String} originalText - The text that the user had to type.
* @param {String} textTyped - The text that the user typed.
* @param {Number} timeTaken - How long the user took to type the text (in milliseconds).
* @param {Object} [options] - Additional options.
* @param {String} [options.rounding="whole"] - What type of rounding should take place. Valid options are "none", "whole", and "hundreth".
* @param {String} [options.returnType="number"] - What data type to return. String will add labels to the data (e.g. "100 WPM").
* @returns {Object} An object containing the WPM and accuracy.
*/
module.exports = function(originalText, textTyped, timeTaken, options) {
// ...
}
1.0.0
3 years ago