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

constructor-word-guess-2

v1.0.2

Published

A colorful CLI-based word guessing game. You can use this to easily create a word guessing game with whatever words you choose.

Downloads

2

Readme

Constructor Word Guess 2

Welcome to Constructor Word Guess 2. Constructor Word Guess 2 is a colorful CLI-based word guessing game. You can use this to easily create a word guessing game with whatever words you choose.

Getting Started

To install on your local machine, run the following in your terminal:

$ npm install constructor-word-guess-2

Create a .js file and use the following

const wordGuess = require('constructor-word-guess-2');

Quick Start

Copy and paste the following into your index.js file:

const wordGuess = require('constructor-word-guess-2');
let array = ['stringone', 'stringtwo', 'stringthree', 'stringfour'];

wordGuess(array);

To start the game, you must pass an array as an argument in your function. For example:

let array = ['stringone', 'stringtwo', 'stringthree', 'stringfour'];

wordGuess(array);

Things to note

Arrays may only consist of alphabetic strings. Numbers, special characters, or spaces in a string will not allow the application to function properly.

Game Play

Users will first be greeted with an option to play a new game or exit the game.

Welcome

Upon selecting "New Game" users will start a new game and can begin guessing letters.

Users may only enter one lowercase letter. If a user enters numbers, special characters, uppercase letters or multiple letters they will see an error message instructing them of their mistake. validation

Additionally, users will be notified if they guess the same letter more than once. Duplicate_Letters

When a user guesses all the letters of a word correctly, they will be notified that they have one and will be asked if they want to start a new game or exit. Win

If a users guesses all of the words correctly, they will be shown a message saying they have guesed all the words correctly and the application will exit back to the terminal. Win_Game

Should a user make 10 mistakes when guessing letters, they will lose the game and be offered the opportunity to either start a new game or exit. Lose_Round

Exiting the game will take the user back to the terminal. Exit_Game

Below are some examples of what typical game play may look like.

winning

new_game

NPMs used