Comparing version 0.0.3 to 0.1.0
@@ -0,0 +0,0 @@ #!/usr/bin/env node |
{ | ||
"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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
181
0
8628
3
+ Addedcheck-types@1.1.1(transitive)
+ Addedmatrix-paths@0.0.3(transitive)
+ Addedprefix-dictionary@0.0.1(transitive)
- Removedcheck-types@0.6.5(transitive)
- Removedmatrix-paths@0.0.2(transitive)
- Removedprefix-dictionary@0.0.0(transitive)
Updatedcheck-types@~1.1.1
Updatedmatrix-paths@0.0.3
Updatedprefix-dictionary@0.0.1