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
import { suite, add, cycle, complete } from "benny" | |
import { | |
HexMapFlatObj, | |
HexMapFlatMap, | |
HexMapNestedObj, | |
HexMapNestedArr, | |
HexMapFlatArr, | |
HexMapFlatUint16, | |
} from "./HexMap.ts" |
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
import b from "benny" | |
const SIZE = 100_000 | |
let list = {} | |
for (let i = SIZE; i > 0; i--) { | |
list = !list.value ? { value: i, rest: null } : { value: i, rest: list } | |
} |
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
the 6124534 | |
and 3509982 | |
of 3159142 | |
to 2895919 | |
in 1744034 | |
he 1492455 | |
that 1421749 | |
was 1336947 | |
it 1207945 | |
his 1072113 |
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 __create = Object.create; | |
var __defProp = Object.defineProperty; | |
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
var __getOwnPropNames = Object.getOwnPropertyNames; | |
var __getProtoOf = Object.getPrototypeOf; | |
var __hasOwnProp = Object.prototype.hasOwnProperty; | |
var __commonJS = (cb, mod) => | |
function __require() { | |
return ( | |
mod || |
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
/* ==UserStyle== | |
@name Typelit Monika | |
@namespace github.com/openstyles/stylus | |
@version 1.0.0 | |
@description A new userstyle | |
@author Me | |
==/UserStyle== */ | |
@-moz-document domain(typelit.io) { | |
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
2 3 5 7 11 13 17 19 23 29 | |
31 37 41 43 47 53 59 61 67 71 | |
73 79 83 89 97 101 103 107 109 113 | |
127 131 137 139 149 151 157 163 167 173 | |
179 181 191 193 197 199 211 223 227 229 | |
233 239 241 251 257 263 269 271 277 281 | |
283 293 307 311 313 317 331 337 347 349 | |
353 359 367 373 379 383 389 397 401 409 | |
419 421 431 433 439 443 449 457 461 463 | |
467 479 487 491 499 503 509 521 523 541 |
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
[ | |
{ | |
"link": "https://www.reddit.com/r/learnjavascript/comments/13pvbuw/insert_links_from_a_separate_file/", | |
"title": "Insert links from a separate file?" | |
}, | |
{ | |
"link": "https://www.reddit.com/r/learnjavascript/comments/13pb14j/es6_vs_es2022_can_we_study_es6_first_then_proceed/", | |
"title": "ES6 vs ES2022: can we study ES6 first then proceed with ES2022 later?" | |
} | |
] |
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
// JS remainder operator `%` won't work for our case, | |
// we need a modulo that follows modular arithmetics definition. | |
function mod(num, modulus) { | |
return ((num % modulus) + modulus) % modulus; | |
} | |
// Alternative (not strict, but IMO easier to remember) | |
function modAlt(num, modulus) { | |
const x = num % modulus; | |
return x < 0 ? x + modulus : x; |
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
/** | |
* Simple wrapper for localStorage and sessionStorage, | |
* that takes care of data initialization, serialization and deserialization, | |
* so you can work with simple JSON-compatible values. | |
*/ | |
function wrapStorage(storage, initialData = {}) { | |
const publicAPI = { | |
get size() { | |
return storage.length | |
}, |
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
import benny from "benny"; | |
const data = Array.from({ length: 100_000 }, (_, i) => i); | |
let r1 = 0; | |
let r2 = 0; | |
let r3 = 0; | |
let r4 = 0; | |
let r5 = 0; |
NewerOlder