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
var boxes = document.querySelectorAll('.box'); | |
var gamestatus = { 1: '', 2: '', 3: '', 4: '', 5: '', 6: '', 7: '', 8: '', 9: '' }; | |
var seq = []; | |
var seq_x = []; | |
var seq_o = []; | |
var gameEnd = false; | |
var $ = el => document.querySelector(el); | |
function changed(el) { |
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
const correctSemverRange = (ver, range) => { | |
const foundSymbol = range.match(/\D/); | |
const rangeSymbol = foundSymbol ? foundSymbol[0] : 'default'; | |
const rangeNumArr = range.match(/[^\^|\~]+/)[0].split('.'); | |
const verNumArr = ver.split('.'); | |
const shouldMatch = { | |
'^': [['=', '>', ''], ['=', '=', '>=']], | |
'~': [['=', '=', '>=']], | |
'default': [['=', '=', '=']] | |
}; |
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
const correctSemverRange = (ver, range) => { | |
const shouldMatch = { | |
'^': [['=', '>', ''], ['=', '=', '>=']], | |
'~': [['=', '=', '>=']], | |
'default': [['=', '=', '=']] | |
}; | |
const rangeSymbol = (isNaN(parseInt(range.substring(0, 1)))) ? range.substring(0, 1) : 'default'; | |
const verNumArr = ver.split('.'); | |
let rangeNumArr = range.split('.'); | |
let result = false; |
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
const correctSemverRange = (ver, range) => { | |
const shouldMatch = { | |
'^': [['=', '>', ''], ['=', '=', '>=']], | |
'~': [['=', '=', '>=']], | |
'default': [['=', '=', '=']] | |
}; | |
const rangeSymbol = range.substring(0, 1); | |
const verNumArr = ver.split('.'); | |
let rangeNumArr = range.split('.'); | |
let result = false; |