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
{ | |
"name": "The case of the missing foot", | |
"witnesses": [{ | |
"name": "Lorena Delure", | |
"build": "burly", | |
"traits": ["cheerful"], | |
"gender": "adult woman", | |
"job": { | |
"name": "car dealer", | |
"age": [7, "year"], |
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 type from "@unction/type" | |
export default function append (value: mixed): Function { | |
return function appendLeft (orderedList: ArrayType | string): ArrayType | string { | |
switch (type(orderedList)) { | |
case "String": { | |
return `${orderedList}${value}` | |
} | |
case "Array": { | |
return [...orderedList, value] |
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 jo = person({name: "Jo"}) | |
> jo.greet() | |
'Hi my name is Jo, I\'m 0!' | |
> jo.birthday() | |
1 | |
> jo.greet() | |
'Hi my name is Jo, I\'m 1!' | |
> jo.birthday() | |
2 | |
> jo.greet() |
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
| npx lerna run --scope=@unction/replacewhen test | |
lerna info version 2.0.0 | |
lerna info versioning independent | |
lerna info scope @unction/replacewhen | |
lerna ERR! test Errored while running script in '@unction/replacewhen' | |
lerna ERR! execute Error: Command failed: npm run test | |
lerna ERR! execute npm ERR! code ELIFECYCLE | |
lerna ERR! execute npm ERR! errno 1 | |
lerna ERR! execute npm ERR! @unction/[email protected] test: `tap --reporter min './transpiled/test.js'` | |
lerna ERR! execute npm ERR! Exit status 1 |
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 mapKeys from "@unction/mapkeys" | |
import mapValues from "@unction/mapvalues" | |
import isObject from "@unction/isobject" | |
import nestedApply from "@unction/nestedapply" | |
import {pipe} from "ramda" | |
import {ifElse} from "ramda" | |
import {identity} from "ramda" | |
import {range} from "ramda" | |
import camelCase from "camelcase" |
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
// pyramidPaths: Array<PathWithFiller> -> Tree -> Value | |
pyramidPaths( | |
[ | |
["ephemeral", "current", "session"], | |
["resources", "sessions", true, "relationships", "account", "data", "id"], | |
["resources", "accounts", true, "attributes", "name"] | |
] | |
)( | |
{ | |
ephemeral: { |
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 {ipcRenderer} = window.require("electron") | |
import xstream from "xstream" | |
import logger from "@seditor/logger" | |
export default function ipc (channel) { | |
return xstream.create({ | |
next (listener) { | |
ipcRenderer.on(channel, (event, signal) => { |
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
krainboltgreene on macbookpro.local in unction.js working on core | |
| lerna bootstrap | |
lerna info version 2.0.0-rc.5 | |
lerna info versioning independent | |
lerna info Bootstrapping 62 packages | |
lerna info lifecycle preinstall | |
lerna info Installing external dependencies | |
lerna info Symlinking packages and binaries | |
lerna info lifecycle postinstall | |
lerna info lifecycle prepublish |
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
function point(x: number, y: number): [number, number] { | |
return [x, y] | |
} | |
function point(x: number, y: string): [number, number] { | |
return [x, parseInt(y)] | |
} | |
function point(x: string, y: number): [number, number] { | |
return [parseInt(x), y] |
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 xs from "xstream" | |
import view from "@deushack/view" | |
const state$ = xs.of({ | |
resources: { | |
programs: { | |
overload: { | |
id: "overload", | |
type: "programs", | |
attributes: { |