typing-stats.js

1.0.0 • Public • Published

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) {
  // ...
}

Readme

Keywords

none

Package Sidebar

Install

npm i typing-stats.js

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

3.7 kB

Total Files

4

Last publish

Collaborators

  • thwampusthewumpus