wordle-cli
Advanced tools
Comparing version 1.0.2 to 1.0.3
#! /usr/bin/env node | ||
const { createInterface } = require('readline') | ||
const { getWord, validateWord } = require('./getWord') | ||
const word = require('./functions') | ||
const getOptions = require('./getOptions') | ||
const showWord = require('./showWord') | ||
const messages = require('./messages') | ||
@@ -13,3 +12,3 @@ | ||
const options = getOptions() | ||
const wordOfTheDay = options.word || getWord(options.date, options.random) | ||
const wordOfTheDay = options.word || word.get(options.date, options.random) | ||
const guessRegex = new RegExp(`^[a-z]{${wordOfTheDay.length}}$`, 'i') | ||
@@ -32,6 +31,2 @@ | ||
return | ||
} else if (!validateWord(input.toLowerCase())) { | ||
console.log(`\n${input.toUpperCase()} is not a valid word!\n`) | ||
round() | ||
return | ||
} else if (!options.unlimited) { | ||
@@ -86,3 +81,3 @@ currentRound++ | ||
showWord(result) | ||
word.show(result) | ||
@@ -89,0 +84,0 @@ // Start new round or end game |
{ | ||
"name": "wordle-cli", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "CLI interpretation of the game Wordle", | ||
@@ -5,0 +5,0 @@ "main": "bin/index.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
152497
8
13214