This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function validate(board) { | |
const input = getArray(board); | |
const predicates = [ | |
hasValidStructure, | |
createDataValidator([9, 1]), | |
createDataValidator([1, 9]), | |
createDataValidator([3, 3]) | |
]; | |
const isValid = predicates.every(fn => fn(input)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Transform for Knockout 3+ | |
* (c) Denis Gulin | |
* License: MIT (http://www.opensource.org/licenses/mit-license.php) | |
*/ | |
!function (factory) { | |
// Support three module loading scenarios | |
if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') { | |
// [1] CommonJS or Node: hard-coded dependency on "knockout" | |
factory(require("knockout")); |