source code was moved into github repository: https://github.com/Svehla/TS_DeepMerge
This file contains hidden or 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 optSafeId = Array.from({ length: 1300 - 13 + 1 }, (_, i) => i + 13) | |
var perfectCube = i => Math.round(i**(1/3))**3 === i // float fuckup | |
var perfectSquare = i => Math.round(i**(1/2))**2 === i // float fuckup | |
var lg500 = i => i > 500 | |
var secDig1 = i => i.toString().substr(1, 1) == '1' | |
var truth = (isTruth, val) => isTruth ? val : !val | |
// combinatorics hacked by bin numbers | |
var possibleResponses = Array.from({ length: 2 ** 4 }) | |
.map((_, i) => i.toString(2).padStart(4, '0')) |
This file contains hidden or 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 fs = require('fs') | |
const wordsInput = fs.readFileSync('./czech.txt', 'utf-8') | |
const letters = ['a', 'b', 'c', 'd', 'e', 'f', 'o'] | |
const filteredWords = wordsInput | |
.split('\n') | |
.map(word => word.trim()) | |
.filter(Boolean) |