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 root = function () { | |
if (typeof window !== 'undefined') return window | |
if (typeof self !== 'undefined') return self | |
if (typeof globalThis !== 'undefined') return globalThis | |
if (typeof global !== 'undefined') return global | |
if (typeof this !== 'undefined') return this | |
}() | |
export const requestAnimationFrame = |
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
class Leftist<A> { | |
left: leftist<A> | |
right: leftist<A> | |
value: A | |
rank: number | |
constructor(value: A, rank: number, left: leftist<A>, right: leftist<A>) { | |
this.value = value | |
this.rank = rank | |
this.left = left |
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
//@flow | |
const unify = (() => { | |
const isValueType = o => | |
typeof o === 'boolean' | |
|| typeof o === 'string' | |
|| (typeof o === 'number' && !isNaN(o)) | |
const toJson = elem => { | |
if (Array.isArray(elem)) { | |
const elems = elem.map(i => toJson(i)) |
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
//@flow | |
import _os from 'os' | |
export function platform() { | |
return process.platform | |
} | |
export function cpuCount() { | |
return _os.cpus().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
//@flow | |
export type Tree = { | |
/*::+*/ id: ID, | |
/*::+*/ kind: 'tree', | |
/*::+*/ refs: Array<Tree>, | |
/*::+*/ head: Array<StepValue>, | |
/*::+*/ tail: Array<Tree>, | |
/*::+*/ config: { | |
runInBand: boolean, | |
}, |
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
// Generated by BUCKLESCRIPT VERSION 4.0.6, PLEASE EDIT WITH CARE | |
'use strict'; | |
var $$Map = require("./stdlib/map.js"); | |
var Sys = require("./stdlib/sys.js"); | |
var List = require("./stdlib/list.js"); | |
var $$Array = require("./stdlib/array.js"); | |
var Curry = require("./stdlib/curry.js"); | |
var Caml_oo = require("./stdlib/caml_oo.js"); | |
var Caml_obj = require("./stdlib/caml_obj.js"); |
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
. |
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
let gr = 0 | |
function classifyNode(node) { | |
if (isFinite(parseInt(node, 36))) return {type: 'int', node, id: node} | |
if (node.startsWith('point_')) return {type: 'point', node, id: node.replace('point_', '')} | |
if (node.startsWith('before_')) return {type: 'before', node, id: node.replace('before_', '')} | |
if (node.startsWith('after_')) return {type: 'after', node, id: node.replace('after_', '')} | |
throw new Error(`unknown node ${node}`) | |
} | |
window.processGraph = function processGraph(graph) { | |
const nodes = Object.keys(graph) |
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
{ | |
"id": "4", | |
"type": "seq", | |
"group": "step", | |
"data": [ | |
{ | |
"id": "3", | |
"type": "single", | |
"group": "step", | |
"data": { |
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
//@flow | |
import { | |
createStore, | |
createEvent, | |
combine, | |
createStoreObject, | |
type Store, | |
// } from '../../npm/effector/effector.bundle' | |
} from '../../npm/effector/effector.es' | |
global.__SNAKE__ = function snake() { |