New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

boggle

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boggle - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

0

index.js

@@ -0,0 +0,0 @@ #!/usr/bin/env node

24

package.json
{
"name": "boggle",
"version": "0.0.3",
"version": "0.1.0",
"description": "Boggle grid solver",

@@ -11,6 +11,11 @@ "main": "index.js",

"scripts": {
"test": "gt src/test/*.js --output",
"complexity": "jsc index.js src/*.js"
"test": "node node_modules/gt src/test/*.js --output",
"complexity": "node node_modules/jsc index.js src/*.js"
},
"repository": "https://bitbucket.org/bahmutov/boggle.git",
"pre-commit": "npm test",
"repository": {
"type": "git",
"url": "git://github.com/bahmutov/boggle.git"
},
"private": false,
"keywords": [

@@ -24,10 +29,11 @@ "boggle",

"dependencies": {
"check-types": "~0.6.4",
"matrix-paths": "0.0.2",
"prefix-dictionary": "0.0.0"
"check-types": "~1.1.1",
"matrix-paths": "0.0.3",
"prefix-dictionary": "0.0.1"
},
"devDependencies": {
"gt": "~0.8.8",
"jsc": "~0.3.5"
"gt": "~0.8.21",
"jsc": "~0.3.11",
"pre-git": "0.0.14"
}
}

@@ -0,0 +0,0 @@ # Boggle solver

var check = require('check-types');
var verify = check.verify;
var utils = require('./utils');
var paths = require('matrix-paths').paths;
check.verifyFunction(paths, 'paths is not a function');
verify.fn(paths, 'paths is not a function');
function report(words) {
check.verifyArray(words, 'expected array of words');
verify.array(words, 'expected array of words');
words.sort();

@@ -34,4 +35,4 @@ words.forEach(utils.unary(console.log));

var dictionary = require('prefix-dictionary');
check.verifyFunction(dictionary.isWord, 'missing isWord');
check.verifyFunction(dictionary.isWordPrefix, 'missing isWordPrefix');
verify.fn(dictionary.isWord, 'missing isWord');
verify.fn(dictionary.isWordPrefix, 'missing isWordPrefix');

@@ -66,3 +67,3 @@ lowerCased = gridOfCharacters.map(function (row) {

// console.log('boggle on', str);
if (check.isString(str)) {
if (check.string(str)) {
str = str.replace(/\s/g, '');

@@ -73,3 +74,3 @@ if (str.length === 16) {

}
if (check.isArray(str) && (str.length === 4)) {
if (check.array(str) && (str.length === 4)) {
return boggleGrid(str);

@@ -83,2 +84,2 @@ }

report: report
};
};

@@ -0,0 +0,0 @@ var boggle = require('../boggle').boggle;

@@ -0,0 +0,0 @@ gt.module('e2e tests');

var check = require('check-types');
function verifyGridOfChars(grid) {
check.verifyArray(grid, 'expected an Array');
check.verify.array(grid, 'expected an Array');
console.assert(grid.every(function (row) {
return row.every(function (value) {
return check.isString(value) && check.isLength(value, 1);
return check.string(value) && check.length(value, 1);
});

@@ -29,2 +29,2 @@ }), 'expected grid of characters');

validWords: validWords
};
};

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc