repo
stringlengths
5
106
file_url
stringlengths
78
301
file_path
stringlengths
4
211
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:56:49
2026-01-05 02:23:25
truncated
bool
2 classes
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/core/__tests__/into.test.js
core/__tests__/into.test.js
const into = require('../into') describe('core/into', () => { test('injects into object', () => { expect.assertions(1) const expected = { one: 1, two: 2 } const actual = into('two')(obj => obj.one + 1)({ one: 1 }) return expect(actual).resolves.toMatchObject(expected) }) })
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/core/__tests__/run.test.js
core/__tests__/run.test.js
const run = require('../run') describe('core/run', () => { test('runs main with no state', () => { const expected = undefined const main = jest.fn().mockImplementation(() => Promise.resolve()) run({ main }) const actual = main.mock.calls[0][0] return expect(actual).toBe(expected) }) test('wi...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/core/__tests__/pipeR.test.js
core/__tests__/pipeR.test.js
const pipeR = require('../pipeR') describe('core/pipeR', () => { test('afd', () => { const expected = 10 const func = pipeR(next => [ num => num < 10 ? next(num + 1) : num ]) const actual = func(0) expect(actual).resolves.toBe(expected) }) })
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/core/pipe/index.js
core/pipe/index.js
const maybeExec = require('../../_internal/maybeExec') const pipe = (funcs = []) => funcs.length === 0 ? (() => { throw Error('pipe requires at least one argument') })() : value => funcs.reduce( (acc, func) => acc.then(maybeExec(func)), Promise.resolve(value) ) module.exports = p...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/core/pipe/sync.js
core/pipe/sync.js
const maybeExec = require('../../_internal/maybeExec') const pipe = (funcs = []) => funcs.length === 0 ? (() => { throw Error('pipe/sync requires at least one argument') })() : value => funcs.reduce( (acc, func) => maybeExec(func)(acc), value ) module.exports = pipe
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/core/pipe/__tests__/pipe.test.js
core/pipe/__tests__/pipe.test.js
const pipe = require('../index') describe('core/pipe', () => { test('no arguments throws error', () => { expect.assertions(1) const actual = () => pipe() const expected = Error('pipe requires at least one argument') return expect(actual).toThrow(expected) }) test('async argument is primitive ret...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/core/pipe/__tests__/sync.test.js
core/pipe/__tests__/sync.test.js
const pipeSync = require('../sync') describe('core/pipe', () => { test('no arguments throws error', () => { expect.assertions(1) const actual = () => pipeSync() const expected = Error('pipe/sync requires at least one argument') return expect(actual).toThrow(expected) }) test('sync argument is pr...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/_internal/isIterable.js
_internal/isIterable.js
const is = require('../type/is') const isFunction = is(Function) const isIterable = iterable => iterable != null && (isFunction(iterable[Symbol.iterator]) || isFunction(iterable[Symbol.asyncIterator])) module.exports = isIterable
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/_internal/call.js
_internal/call.js
const isThenable = require('./isThenable') /* * Takes a value or a Promise and applies func to it. */ // call :: Function -> Any -> Any | Promise<Any> const call = func => value => isThenable(value) ? value.then(func) : func(value) module.exports = call
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/_internal/maybeExec.js
_internal/maybeExec.js
const is = require('../type/is') const isFunction = is(Function) const maybeExec = maybeFunc => value => (isFunction(maybeFunc) ? maybeFunc(value) : maybeFunc) module.exports = maybeExec
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/_internal/isThenable.js
_internal/isThenable.js
const isThenable = obj => obj != null && typeof obj.then === 'function' module.exports = isThenable
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/_internal/iterableSerialReduce.js
_internal/iterableSerialReduce.js
const iterableSerialReduceWhile = require('./iterableSerialReduceWhile') const iterableSerialReduce = iterableSerialReduceWhile.bind(null, null) module.exports = iterableSerialReduce
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/_internal/isFunctor.js
_internal/isFunctor.js
const is = require('../type/is') const isFunction = is(Function) const isFunctor = functor => functor != null && (isFunction(functor['fantasy-land/map']) || isFunction(functor.map)) module.exports = isFunctor
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/_internal/escapeRegExp.js
_internal/escapeRegExp.js
/* from: https://stackoverflow.com/a/1144788/504836 */ const escapeRegExp = str => str.replace(/([.*+?^=!:${}()|[\]/\\])/g, '\\$1') module.exports = escapeRegExp
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/_internal/iterableSerialReduceWhile.js
_internal/iterableSerialReduceWhile.js
const is = require('../type/is') const isFunction = is(Function) const getIterator = iterable => isFunction(iterable.next) ? iterable : isFunction(iterable[Symbol.asyncIterator]) ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]() const iterableSerialReduceWhile = async ( predicate, func, in...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/_internal/__tests__/iterableSerialReduce.test.js
_internal/__tests__/iterableSerialReduce.test.js
const iterableSerialReduce = require('../iterableSerialReduce') describe('internal/iterableSerialReduce', () => { const add = (x, y) => x + y const asyncAdd = (x, y) => Promise.resolve().then(() => x + y) function* iterator() { yield 1 yield 2 yield 3 } test('sync array', () => { const expec...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/_internal/__tests__/iterableSerialReduceWhile.test.js
_internal/__tests__/iterableSerialReduceWhile.test.js
const iterableSerialReduceWhile = require('../iterableSerialReduceWhile') describe('internal/iterableSerialReduceWhile', () => { const add = (x, y) => x + y const asyncAdd = (x, y) => Promise.resolve().then(() => x + y) const predicate = acc => () => acc <= 2 function* iterator() { yield 1 yield 2 ...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/_internal/__tests__/call.test.js
_internal/__tests__/call.test.js
const apply = require('../call') describe('function/call', () => { const increase = num => num + 1 test('sync', () => { const expected = 888 const actual = apply(increase)(887) expect(actual).toBe(expected) }) test('async', () => { const expected = 888 const actual = apply(increase)(Promi...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/_internal/debug/signature.js
_internal/debug/signature.js
const isFunction = value => typeof value === 'function' const isArray = value => value != null && (value.constructor === Array) const isNumber = value => value != null && (value.constructor === Number) const isString = value => value != null && (value.constructor === String) const isObject = value => value != null && (...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/function/curry.js
function/curry.js
const signature = require('../_internal/debug/signature') // curry2 :: Function -> Any -> Any -> Any let curry2 = func => a => b => func(a, b) // curry3 :: Function -> Any -> Any -> Any -> Any let curry3 = func => a => b => c => func(a, b, c) // curry4 :: Function -> Any -> Any -> Any -> Any -> Any let curry4 = func...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/function/tap.js
function/tap.js
const signature = require('../_internal/debug/signature') const isThenable = require('../_internal/isThenable') // tap :: Function -> Any -> Any const tap = func => value => { const result = func(value) return isThenable(result) ? result.then(() => value) : value } module.exports = tap // Experimental debug code...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/function/liftA.js
function/liftA.js
const ap = require('../list/ap') const map = require('../list/map') const liftA = arity => { if (arity < 1) throw new Error('arity must be >= 1') return func => array => { const next = arity => apply => array => { const value = ap(apply)(array) return arity < 2 ? value : next(arity - 1)(value) ...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/function/liftP.js
function/liftP.js
const liftP = arity => { if (arity < 1) throw new Error('arity must be >= 1') return func => promise => { const next = Promise.resolve(promise).then(value => Promise.resolve(func).then(f => f(value))) return (arity < 2) ? next : liftP(arity - 1)(next) } } module.exports = liftP
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/function/lift.js
function/lift.js
const is = require('../type/is') const liftA = require('./liftA') const liftP = require('./liftP') const isMapable = object => object && is(Function)(object.map) const isThenable = object => object && is(Function)(object.then) const lift = arity => func => object => isMapable(object) ? liftA(arity)(func)(object) ...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/function/swap.js
function/swap.js
const signature = require('../_internal/debug/signature') // swap :: Function -> Function const swap = func => a => b => func(b)(a) module.exports = swap // Experimental debug code /* istanbul ignore next */ if (process.env.MOJI_DEBUG === 'true') { module.exports = signature('swap :: Function -> Function')(swap) }...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/function/__tests__/liftA.test.js
function/__tests__/liftA.test.js
const liftA = require('../liftA') const Just = require('../../type/Just') const Nothing = require('../../type/Nothing') describe('function/liftA', () => { const increase = liftA(1)(x => x + 1) const add2 = liftA(2)(x => y => x + y) const add3 = liftA(3)(x => y => z => x + y + z) test('0 Arity throws', () => {...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/function/__tests__/tap.test.js
function/__tests__/tap.test.js
const tap = require('../tap') describe('function/tap', () => { test('returns original argument', () => { const func = () => 666 const tapped = tap(func) const expected = 888 const actual = tapped(expected) expect(actual).toBe(expected) }) test('async returns original argument', () => { c...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/function/__tests__/swap.test.js
function/__tests__/swap.test.js
const swap = require('../swap') describe('function/swap', () => { test('swaps arguments', () => { const func = a => b => `${a}${b}` const swapped = swap(func) const expected = 'BA' const actual = swapped('A')('B') expect(actual).toBe(expected) }) })
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/function/__tests__/curry.test.js
function/__tests__/curry.test.js
const curry = require('../curry') describe('function/curry', () => { const add = (...args) => args.reduce((a, b) => a + b) test('curry1 throws', () => { const actual = () => curry(1)(add) expect(actual).toThrow(Error('Cannot curry a function with 1 arguments.')) }) test('curry2', () => { cons...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/function/__tests__/liftP.test.js
function/__tests__/liftP.test.js
const liftP = require('../liftP') describe('liftP', () => { const increase = num => num + 1 const add = x => y => x + y test('throws Error with arity < 1', () => { expect.assertions(1) const expected = Error('arity must be >= 1') const actual = () => liftP(0) expect(actual).toThrowError(expected...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/function/__tests__/lift.test.js
function/__tests__/lift.test.js
const lift = require('../lift') const Just = require('../../type/Just') describe('function/lift', () => { const increase = lift(1)(x => x + 1) const add2 = lift(2)(x => y => x + y) test('Unknown Type', () => { const expected = new Error('Cannot lift unsupported type "object"') const actual = () => incre...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/threading/sleep.js
threading/sleep.js
const signature = require('../_internal/debug/signature') // sleep :: Number -> Any -> Promise const sleep = milliseconds => value => new Promise( resolve => setTimeout(() => resolve(value), milliseconds) ) module.exports = sleep // Experimental debug code /* istanbul ignore next */ if (process.env.MOJI_DEBUG === ...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/threading/__tests__/sleep.test.js
threading/__tests__/sleep.test.js
const sleep = require('../sleep') describe('threading/sleep', () => { beforeEach(() => jest.spyOn(global, 'setTimeout').mockImplementation(func => func())) afterEach(() => global.setTimeout.mockReset()) test('sleep returns value', () => { expect.assertions(1) const expected = 888 const actual = slee...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/logic/ifError.js
logic/ifError.js
const signature = require('../_internal/debug/signature') const isThenable = require('../_internal/isThenable') // ifError :: Function -> Function -> Function -> Any -> Any const ifError = func => onError => onSuccess => value => { try { const result = func(value) return isThenable(result) ? result.the...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/logic/allPass.js
logic/allPass.js
const signature = require('../_internal/debug/signature') // allPass :: Function -> Any -> Boolean const allPass = predicates => value => { for (const predicate of predicates) { // eslint-disable-line no-restricted-syntax if (!predicate(value)) { return false } } return true } module.exports = al...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/logic/cond.js
logic/cond.js
const signature = require('../_internal/debug/signature') const maybeExec = require('../_internal/maybeExec') const is = require('../type/is') const isFunction = is(Function) const isPass = (test, value) => (isFunction(test) ? test(value) : test === value) // cond :: Array -> Any -> Any const cond = pairs => value =...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/logic/ifElse.js
logic/ifElse.js
const signature = require('../_internal/debug/signature') // ifElse :: Function -> Function -> Function -> Any -> Any const ifElse = condition => onTrue => onFalse => value => (condition(value) ? onTrue : onFalse)(value) module.exports = ifElse // Experimental debug code /* istanbul ignore next */ if (process.env....
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/logic/anyPass.js
logic/anyPass.js
const signature = require('../_internal/debug/signature') // anyPass :: Function -> Any -> Boolean const anyPass = predicates => value => { for (const predicate of predicates) { // eslint-disable-line no-restricted-syntax if (predicate(value)) { return true } } return false } module.exports = any...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/logic/when.js
logic/when.js
const signature = require('../_internal/debug/signature') const ifElse = require('./ifElse') const I = require('../combinators/I') // when :: Function -> Function -> Any -> Any const when = condition => func => ifElse(condition)(func)(I) module.exports = when // Experimental debug code /* istanbul ignore next */ if ...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/logic/unless.js
logic/unless.js
const signature = require('../_internal/debug/signature') const ifElse = require('./ifElse') const I = require('../combinators/I') // unless :: Function -> Function -> Any -> Any const unless = condition => ifElse(condition)(I) module.exports = unless // Experimental debug code /* istanbul ignore next */ if (process...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/logic/__tests__/ifElse.test.js
logic/__tests__/ifElse.test.js
const ifElse = require('../ifElse') describe('logic/ifElse', () => { test('true returns executes true branch', () => { const expected = 888 const actual = ifElse(() => true)(x => x + 1)(666)(887) expect(actual).toBe(expected) }) test('false returns false value', () => { const expected = 888 ...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/logic/__tests__/allPass.test.js
logic/__tests__/allPass.test.js
const allPass = require('../allPass') describe('logic/allPass', () => { const isEven = num => num % 2 === 0 const isLessThan10 = num => num < 10 test('no tests returns true', () => { const expected = true const actual = allPass([])({}) expect(actual).toBe(expected) }) test('fail returns false',...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/logic/__tests__/anyPass.test.js
logic/__tests__/anyPass.test.js
const anyPass = require('../anyPass') describe('logic/anyPass', () => { const isEven = num => num % 2 === 0 const isLessThan10 = num => num < 10 test('no tests returns false', () => { const expected = false const actual = anyPass([])({}) expect(actual).toBe(expected) }) test('one pass returns t...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/logic/__tests__/unless.test.js
logic/__tests__/unless.test.js
const unless = require('../unless') describe('logic/unless', () => { const isOdd = num => num % 2 !== 0 const isEven = num => num % 2 === 0 const double = num => num * 2 test('match calls function', () => { const expected = 888 const actual = unless(isOdd)(double)(444) expect(actual).toBe(expected...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/logic/__tests__/ifError.test.js
logic/__tests__/ifError.test.js
const ifError = require('../ifError') describe('core/ifError', () => { describe('synchronous', () => { test('success calls success', () => { const expected = 888 const mockSuccess = jest.fn() ifError(x => x)(() => null)(mockSuccess)(expected) const actual = mockSuccess.mock.calls[0][0] ...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/logic/__tests__/when.test.js
logic/__tests__/when.test.js
const when = require('../when') describe('logic/when', () => { const isOdd = num => num % 2 !== 0 const isEven = num => num % 2 === 0 const double = num => num * 2 test('match calls function', () => { const expected = 888 const actual = when(isEven)(double)(444) expect(actual).toBe(expected) }) ...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
joelnet/MojiScript
https://github.com/joelnet/MojiScript/blob/1bc7f43fdc105ed252aa3071e22a84676d84fbe1/logic/__tests__/cond.test.js
logic/__tests__/cond.test.js
const cond = require('../cond') describe('logic/cond', () => { const c = cond([ [ null, 'null' ], [ undefined, 'undefined' ], [ 'abc', 'ABC' ], [ x => x === '123', 'ONE TWO THREE' ], [ x => x[0] === 'h', x => x.toUpperCase() ] ]) test('test with null returns value', () => { const expecte...
javascript
MIT
1bc7f43fdc105ed252aa3071e22a84676d84fbe1
2026-01-05T03:37:36.859683Z
false
metcalfc/changelog-generator
https://github.com/metcalfc/changelog-generator/blob/7ce15185ce0a5731acd82b39c5909a0101934136/index.js
index.js
import { getInput, setFailed, setOutput } from '@actions/core' import { exec as _exec } from '@actions/exec' import { context, getOctokit } from '@actions/github' const src = __dirname async function run() { try { let headRef = getInput('head-ref') let baseRef = getInput('base-ref') const myToken = getI...
javascript
MIT
7ce15185ce0a5731acd82b39c5909a0101934136
2026-01-05T03:37:46.124141Z
false
metcalfc/changelog-generator
https://github.com/metcalfc/changelog-generator/blob/7ce15185ce0a5731acd82b39c5909a0101934136/eslint.config.js
eslint.config.js
const js = require('@eslint/js') const globals = require('globals') module.exports = [ js.configs.recommended, { ignores: ['dist/**', 'node_modules/**'] }, { files: ['**/*.js', '**/*.mjs'], languageOptions: { ecmaVersion: 'latest', sourceType: 'module', globals: { ...globa...
javascript
MIT
7ce15185ce0a5731acd82b39c5909a0101934136
2026-01-05T03:37:46.124141Z
false
metcalfc/changelog-generator
https://github.com/metcalfc/changelog-generator/blob/7ce15185ce0a5731acd82b39c5909a0101934136/dist/index.js
dist/index.js
/******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 4914: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var d...
javascript
MIT
7ce15185ce0a5731acd82b39c5909a0101934136
2026-01-05T03:37:46.124141Z
true
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/assets/twemoji/twemoji.min.js
src/sudokupad_interaction/sudoku_pad/assets/twemoji/twemoji.min.js
/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */ var twemoji=function(){"use strict";var twemoji={base:"https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:fromCodePoint,toCodePoint:toCodePoint},onerror:function onerror(){i...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-emoji.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-emoji.js
const FeatureEmoji = (() => { // Helpers const stripHTML = html => { let doc = new DOMParser().parseFromString(html, 'text/html'); return (doc && doc.body && doc.body.textContent) || ''; }; const isPuzzleReady = function() { const {app: {puzzle: {puzzleId, replayPlaying, replayStack = []}, timer: {running}}}...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-bgimage.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-bgimage.js
const FeatureBgImage = (() => { // Helpers const {zip} = PuzzleZipper, {compressPuzzle, encodeFPuzzleData} = loadFPuzzle, {fetchPuzzle, parsePuzzleData, getPuzzleFormat, saveJsonUnzip, decompressPuzzleId} = PuzzleLoader; const decodePuzzle = async puzzleId => 'fpuz' === getPuzzleFormat(puzzleId) ? saveJso...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/puzzleloader.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/puzzleloader.js
const PuzzleLoader = (() => { const {saveDecompress, saveDecodeURIComponent, fixFPuzzleSlashes, parseFPuzzle} = loadFPuzzle; const {saveJsonUnzip, zip} = PuzzleZipper; // Cache const cache = {}; const updateCache = (puzzleId, data) => (cache[puzzleId] = data, data); const clearCache = puzzleId => puzzleId ...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-sudokupadpro.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-sudokupadpro.js
const FeatureSudokupadPro = (() => { // Helpers const {svgToDataUri, puzzleToSvg, urlToImg, imgToCanvas, imgUriToBlob, blobToBlobUrl} = PuzzleTools; const {resolvePuzzleData} = PuzzleLoader; function FeatureSudokupadPro() { bindHandlers(this); this.featureEnabled = false; } const C = FeatureSudokupadPro, ...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-hairgag.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-hairgag.js
const FeatureHairGag = (() => { function FeatureHairGag() { bindHandlers(this); this.featureStylesheet = undefined; this.featureEnabled = false; } const C = FeatureHairGag, P = Object.assign(C.prototype, {constructor: C}); C.SettingName = 'hairgag'; C.featureStyle = ``; // API C.create = async function...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-gifting.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-gifting.js
const FeatureGifting = (() => { // Helpers const {compressPuzzle} = loadFPuzzle, {zip} = PuzzleZipper, {parsePuzzleData, fetchPuzzle} = PuzzleLoader, {icons} = Framework; function FeatureGifting() { bindHandlers(this); this.featureEnabled = false; this.currentMessage = ''; this.currentSolve...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/tool-replay.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/tool-replay.js
const ToolReplay = { button: { name: 'replay', title: 'Replay', content: `<div class="icon"><svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px"><path d="M5.58 16.89l5.77-4.07c.56-.4.56-1.24 0-1.63L5.58 7.11C4.91 6.65 4 7.12 4 7.93v8.14c0 .81.91 1.28 1.58.82zM13 7.93v8.14c0 .81.9...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/stegosaur.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/stegosaur.js
/*! Author: Sven Neumann <killroy@gmail.com> */ const Stegosaur = (() => { const strToData = str => LZipper.compact256(str).split('').map(c => c.charCodeAt(0) & 0xff); const dataToStr = dat => LZipper.expand256(dat.map(b => String.fromCharCode(b)).join('')); const bytesToBits = bytes => [].concat.apply([], bytes.ma...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-largepuzzle.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-largepuzzle.js
const FeatureLargePuzzle = (() => { // Helpers const {minDrag, makeGrabScrollHandler, attachScrollHandler, dettachScrollHandler} = SudokuPadUtilities; const getDimensions = () => { const {CellSize: CS} = SvgRenderer, {app, app: {svgRenderer, puzzle: {rows, cols}}} = Framework, [left, top, width, he...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-settingssave.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-settingssave.js
(() => { const FeatureSettingsSave = (() => { function FeatureSettingsSave() { bindHandlers(this); } const C = FeatureSettingsSave, P = Object.assign(C.prototype, {constructor: C}); C.SettingName = 'settingssave'; P.applySetting = function(name, val) { Framework.setSetting(name, val); Framework.togg...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-puzzlefont.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-puzzlefont.js
const FeaturePuzzleFont = (() => { function FeaturePuzzleFont() { bindHandlers(this); PortableEvents.mixin(this); this.featureEnabled = false; } const C = FeaturePuzzleFont, P = Object.assign(C.prototype, {constructor: C}); C.Name = 'puzzlefont'; C.SettingName = C.Name; C.FontDefs = [ {id: 'baublemonogr...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-solvedcounter.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-solvedcounter.js
const FeatureSolvedCounter = (() => { // Helpers const oneHour = 3600 * 1000, oneDay = 24 * oneHour; const plur = val => val === 1 ? '' : 's'; const waitForElem = async (selector, interval = 10, timeout = 500) => { let t1 = Date.now() + timeout, el; do { if(el = document.querySelector(selector)) retur...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-markup.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-markup.js
const FeatureMarkup = (() => { function FeatureMarkup() { bindHandlers(this); PortableEvents.mixin(this); } const C = FeatureMarkup, P = Object.assign(C.prototype, {constructor: C}); C.Name = 'markup'; C.SettingName = C.Name; C.featureStyle = ` .fabcan { position: absolute; top: 0; left: 0; wid...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-fog.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-fog.js
const FeatureFog = (() => { // Helpers const cellListsEqual = (a, b) => { if(a.length !== b.length) return false; for(let i = 0, len = a.length; i < len; i++) { if(a[i] !== b[i]) return false; } return true; }; const lightUpLamps = (grid, lamps) => { const {rows, cols} = grid; const cells ...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-compactmarks.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-compactmarks.js
(() => { const FeatureCompactMarks = (() => { function FeatureCompactMarks() { bindHandlers(this); this.featureEnabled = false; } const C = FeatureCompactMarks, P = Object.assign(C.prototype, {constructor: C}); C.SettingName = 'compactmarks'; C.RangeMinSize = 5; P.handleRenderPropCandidates = funct...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-puzzleevents.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-puzzleevents.js
var FeaturePuzzleEvents = (() => { // Triggers const PuzzleTriggerThreeInTheCorner = (() => { function PuzzleTriggerThreeInTheCorner() { bindHandlers(this); this.queue = []; this.timeoutId = undefined; } const C = PuzzleTriggerThreeInTheCorner, P = Object.assign(C.prototype, {constructor: C});...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-showseencells.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-showseencells.js
(() => { // TODO: Rewrite as feature component /* const getRegionShape = (size = 9) => { let height = Math.sqrt(size); if(Number.isInteger(height)) return [height, height]; height = Math.floor(height); while(!Number.isInteger(size / height) && height > 1) height--; return height > 0 ? [height, size / hei...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-streamtool.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-streamtool.js
const FeatureStreamTool = (() => { // Helpers const {EffectConfetti, PuzzleEffectConfetti} = FeaturePuzzleEvents; const {fetchPuzzle, parsePuzzleData, resolvePuzzleData} = PuzzleLoader; const getEventPos = e => e.touches ? [e.touches[0].clientX, e.touches[0].clientY] : [e.clientX, e.clientY]; const resolveCel...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/appmenu.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/appmenu.js
function createAppMenu() { const closeMenu = event => { Framework.app.off('restarted', handleRestarted); document.querySelector('#appmenu').classList.toggle('open'); removeMoveEventHandler('#appmenu.mdc-drawer', handleMoveOverlay); removeDownEventHandler('#appmenu.mdc-drawer', handleClickOverlay); removeMo...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/utilities.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/utilities.js
// System const VisChangeEventName = document.webkitHidden ? 'webkitvisibilitychange' : 'visibilitychange'; const reportAndRethrow = note => err => { console.error('%s\n%s', (note || 'Error:'), err); throw err; }; const sleep = ms => res => new Promise(resolve => setTimeout(() => resolve(res), ms)); const bin...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-uitheme.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-uitheme.js
(() => { const FeatureUITheme = (() => { function FeatureUITheme() { bindHandlers(this); this.featureEnabled = false; } const C = FeatureUITheme, P = Object.assign(C.prototype, {constructor: C}); C.SettingName = 'uitheme'; C.featureStyle = ` .setting-uitheme-monolight { --main-color: #333; ...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-puzzlepack.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-puzzlepack.js
const FeaturePuzzlePack = (() => { // Helpers const {stripPuzzleFormat, decompressPuzzleId, fetchPuzzle, parsePuzzleData} = PuzzleLoader, {ThumbSettingsExclude, puzzleToSvg, svgToDataUri} = PuzzleTools; function FeaturePuzzlePack() { bindHandlers(this); PortableEvents.mixin(this); this.featureEnabled = ...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/twemoji.min.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/twemoji.min.js
/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */ var twemoji=function(){"use strict";var twemoji={base:"https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:fromCodePoint,toCodePoint:toCodePoint},onerror:function onerror(){i...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-replaygif.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-replaygif.js
const FeatureReplayGif = (() => { // Helpers const {svgToDataUri, puzzleToSvg, blobToBlobUrl, svgToBlob, imgUriToBlob} = PuzzleTools; const {resolvePuzzleData} = PuzzleLoader; function FeatureReplayGif() { bindHandlers(this); PortableEvents.mixin(this); this.featureEnabled = false; this.status = 'idle';...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/controls-tools.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/controls-tools.js
const ToolNormal = { button: { name: 'normal', title: 'Digit', content: `<div class="icon">${Framework.icons.toolNormal}</div>Digit`, }, tool: { name: 'normal', isTool: true, actionLong: 'value', actionShort: 'vl', } }; const ToolCorner = { button: { name: 'corner', title: 'Corner', content: `<div...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/lazygtmloader.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/lazygtmloader.js
(() => { window.dataLayer=window.dataLayer??[]; window.gtag=window.gtag??function gtag(){dataLayer.push(arguments)}; gtag('js', new Date()); const opts = {linker: { accept_incoming: true, cookie_domain: 'auto', domains: ['sudokupad.app', 'beta.sudokupad.app', 'alpha.sudokupad.app', 'app.crackingthecryptic.com...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-gridrules.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-gridrules.js
const FeatureGridRules = (() => { // Helpers const gridToRulesHtml = grid => `<div class="gridrules"> <div class="titleandauthor"> <span class="title">${textToHtml(grid.title)}</span> <span class="author">by ${textToHtml(grid.author || 'Unknown')}</span> </div> ${Framework.app.puzzle.getRules(true,...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-conflictchecker.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-conflictchecker.js
const FeatureConflictChecker = (() => { function FeatureConflictChecker() { bindHandlers(this); PortableEvents.mixin(this); this.featureStylesheet = undefined; this.featureEnabled = false; } const C = FeatureConflictChecker, P = Object.assign(C.prototype, {constructor: C}); C.Name = 'conflictchecker'; C...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-labelrowscols.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-labelrowscols.js
(() => { const FeatureRowColLabels = (() => { function FeatureRowColLabels() { bindHandlers(this); this.featureStylesheet = undefined; this.featureEnabled = false; this.labelsElem; this.labelledPuzzle; } const C = FeatureRowColLabels, P = Object.assign(C.prototype, {constructor: C}); C.Sett...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/tool-calculator.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/tool-calculator.js
const KillerCalculator = (() => { // Helpers const {makeGrabScrollHandler, attachScrollHandler, dettachScrollHandler} = SudokuPadUtilities; const {seenCageCells, intersectCageCells} = PuzzleTools; const combSum = comb => { let sum = 0, i = comb.length; while(i--) sum += comb[i]; return sum; }; cons...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/tool-letter.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/tool-letter.js
/* Letter Tool Activation Options: 1. "altletter": Hold ALT to enter 26 letters, all other hotkeys work normally (i.e. ctrl+alt+letter = letter center mark) 2. "althotkey": Enter 26 letters directly, hold ALT for other hotkeys (i.e. CTRL+ALT+a = select all) 3. "shiftletter": Hold SHIFT to enter 26 letters, all oth...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-rulealert.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-rulealert.js
const FeatureRuleAlert = (() => { function FeatureRuleAlert() { bindHandlers(this); this.featureEnabled = false; } const C = FeatureRuleAlert, P = Object.assign(C.prototype, {constructor: C}); C.Name = 'rulealert'; C.SettingName = C.Name; C.featureStyle = ` #controls .rulealert { position: absolute; ...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/controls-app.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/controls-app.js
const createInfoOverlay = () => { let appElem = document.querySelector('.app'); let svg; const handleResize = event => { let {clientWidth: w, clientHeight: h} = appElem; svg.adjustViewBox(0, 0, w, h); handleRender(); }; const handleClose = event => { event.preventDefault(); event.stopPropagation(); hi...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/script.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/script.js
/*! Author: Sven Neumann <sven@svencodes.com> Contributors: Mark Langezaal (MarkTekfan / MarkTekfan#8907) 1. Undo statestack bug fix (v0.59.1) 2. Improved diagonal drag selecting (v0.63.0) 3. Redo/select bug fix (v0.64.0) 4. Inspired/encouraged the multi-colour mode (v0.66.0) 5. UI animation for dialogs (v0....
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
true
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/tool-pen.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/tool-pen.js
const ToolPen_tool = (() => { function ToolPen() { bindHandlers(this); this.name = 'pen'; this.isTool = true; this.actionLong = 'pen'; this.actionShort = 'pe'; this.stateColor = undefined; this.selectedColor = undefined; this.lineMode = 'both'; this._actList = []; } const C = ToolPen, P = Object...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/puzzletools.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/puzzletools.js
const PuzzleTools = (() => { const encode70Chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz()[]-.~:@!$&\'*,;=_'; const reEncode70Chars = new RegExp(`^[123456789${encode70Chars.replace(/./g, '\\$&')}]+$`); const encode70CharsMax = encode70Chars.length - 1; const encode70 = num => encode70Chars[num]; co...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/tool-color.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/tool-color.js
const ToolColor_tool = (() => { function ToolColor() { bindHandlers(this); this.name = 'colour'; this.isEnabled = false; this.isTool = true; this.actionLong = 'colour'; this.actionShort = 'co'; this.palette = undefined; this.currentPage = undefined; this.btnPalette = undefined; this.editMode = fal...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/app-settings.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/app-settings.js
const handleCageSelectionInit = () => { const SettingName = 'selection'; const validSettings = ['cage', 'default', 'light', 'dark'], defaultSetting = 'cage'; let svgRenderer, svgElem, puzzle; let cageStyleEnabled = false; const clearSelectionCage = () => { if(!cageStyleEnabled) return; cageStyleEnabled = fals...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/tool-select.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/tool-select.js
const ToolSelect = { tool: { name: 'select', isTool: false, selectMode: false, init: function() { this.handleToggle = this.handleToggle.bind(this); this.handleUpdateKeys = this.handleUpdateKeys.bind(this); addDownEventHandler('#control-select', this.handleToggle, {passive: false}); }, handleToggl...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-project9x9.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-project9x9.js
const FeatureProject9x9 = (() => { // Helpers const getTransform = el => { const [scale, x, y] = (getComputedStyle(el).transform .match(/matrix\(\s*([^,]*)\s*,[^,]*,[^,]*,[^,]*,\s*([^,]*)\s*,\s*([^,]*)\s*\)/) || []) .slice(1).map(n => parseFloat(n)) ; return {x, y, scale}; }; const setTransfor...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-endless.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-endless.js
const FeatureEndless = (() => { // Helpers const {ThumbSettingsExclude, puzzleToSvg, svgToDataUri} = PuzzleTools; const {fetchPuzzle, parsePuzzleData, resolvePuzzleData} = PuzzleLoader; const isInViewport = (el) =>{ const rect = el.getBoundingClientRect(); return ( rect.top >= 0 && rect.left >= 0 ...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-copycells.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-copycells.js
const FeatureCopyCells = (() => { function FeatureCopyCells() { bindHandlers(this); PortableEvents.mixin(this); this.featureEnabled = false; } const C = FeatureCopyCells, P = Object.assign(C.prototype, {constructor: C}); C.Name = 'copycells'; C.SettingName = C.Name; C.SettingNameSymbolBlank = `${C.Settin...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/solver.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/solver.js
function createSolver(puzzle81) { const digits = '123456789'.split(''); const rowOffset = [0, 1, 2, 3, 4, 5, 6, 7, 8]; const colOffset = [0, 9, 18, 27, 36, 45, 54, 63, 72]; const boxOffset = [0, 1, 2, 9, 10, 11, 18, 19, 20]; let puzzle729 = []; const buildCellMap = (cellMap = []) => { for(let i = 0; i < 81; i+...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-shorturl.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-shorturl.js
const FeatureShortUrl = (() => { function FeatureShortUrl() { bindHandlers(this); PortableEvents.mixin(this); this.featureEnabled = false; } const C = FeatureShortUrl, P = Object.assign(C.prototype, {constructor: C}); C.Name = 'shorturl'; C.SettingName = C.Name; C.featureStyle = ` .setting-outlinetest-ou...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-fpuz.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-fpuz.js
const FeatureFpuz = (() => { const {compressPuzzle} = loadFPuzzle; const {fetchPuzzle, getPuzzleFormat, decompressPuzzleId, parsePuzzleData, resolvePuzzleData} = PuzzleLoader; function FeatureFpuz() { bindHandlers(this); this.featureEnabled = false; this.config = C.DefaultConfig; } const C = FeatureFpuz, ...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-screenshot.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-screenshot.js
const FeatureScreenshot = (() => { // Helpers const {svgToDataUri, puzzleToSvg, urlToImg, imgToCanvas, imgUriToBlob, blobToBlobUrl, svgToDataUriBase64} = PuzzleTools; const {resolvePuzzleData} = PuzzleLoader; const ua = navigator.userAgent, isWebkit = ua.match(/Safari/i) && !ua.match(/Chrome/i); function Feat...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-customcolors.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-customcolors.js
const FeatureCustomColors = (() => { function FeatureCustomColors() { bindHandlers(this); this.featureEnabled = false; } const C = FeatureCustomColors, P = Object.assign(C.prototype, {constructor: C}); C.Name = 'customcolors'; C.SettingName = C.Name; C.featureStyle = ` body { #cell-grids .cell-grid, #ce...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/framework.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/framework.js
const Framework = (() => { function Framework() {} const F = Framework, P = Object.assign(F.prototype, {constructor: F}); PortableEvents.mixin(F); F.SettingsKey = 'settings'; F.icons = { toolNormal: `<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" fill="currentColor"><path...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
true
SakanaAI/Sudoku-Bench
https://github.com/SakanaAI/Sudoku-Bench/blob/3b8d88d64c01962284ecccb7ba7f06925d5cb643/src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-marksolveddigits.js
src/sudokupad_interaction/sudoku_pad/sudoku_pad_scripts/feature-marksolveddigits.js
(() => { const FeatureMarkSolvedDigits = (() => { // Helpers const cellToVal = cell => cell.hideclue ? '.' : cell.getVal() || '.'; function FeatureMarkSolvedDigits() { bindHandlers(this); this.featureStylesheet = undefined; this.featureEnabled = false; } const C = FeatureMarkSolvedDigits, P = Obje...
javascript
MIT
3b8d88d64c01962284ecccb7ba7f06925d5cb643
2026-01-05T03:37:51.859283Z
false