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 🙏

© 2024 – Pkg Stats / Ryan Hefner

wpmtest

v1.3.9

Published

A simple class for a words per minute test.

Downloads

22

Readme

image

wpmTest

A class for a words per minutes test.

installing

npm install wpmtest

usage

import {wordsPerMinTest} from wordsPerMinTest

random chars is a bool, true if you want to return to be typing a string of random characters false if you want to type random words

let wpmTest = new wordsPerMinTest(finsishedFunction, minutes, options);

constructor parameters

finished function

this is the function that you pass in that will be called after number of minutes has completed.

minutes: number

this is the number of minutes for 30 seconds use 0.5 for a 1 minute test use 1.

options

this is optional

randomChars: string

boolean that if true will have random characters instead of 200 random words.

displayTextLength: number

the amount of characters in the display text, set to 100 by default.

properties

charPos

is the position in the complete text that the user is on.

completeText

is a string containing the whole 200 words / 1000 charecters

curDisplayText

is the 100 characters of the complete text from the where the char position is.

averageWPM

is the average WPM for the whole all of the completed words

lastTenAvWPM

is the average WPM for the last ten words

minutes

the amount of minutes the test is running for

functions

restartTest

This is used to restart the test, restarts the stop watch as well resetting all of the text.

updateDisplayText (pos: number)

used to update the display text property from the position

calcAverageWPM

used to calculate the total WPM and updates the averageWPM property

mostRecentWPM

used to calculate the total WPM and updates the mostRecentWPM property

checkKeyChar (char: char)

used to check if the key is correct

returns an object:

newWord: bool - if the character is a new word or not
isCharCorrect: bool - if the character is correct then this is true errorText: ?string - this returns the character that was supposed to be typed only defined when