Skip to content

Instantly share code, notes, and snippets.

View krainboltgreene's full-sized avatar
🏠
Working from home

Kurtis Rainbolt-Greene krainboltgreene

🏠
Working from home
View GitHub Profile
{
"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"],
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]
> 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()
| 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
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"
// pyramidPaths: Array<PathWithFiller> -> Tree -> Value
pyramidPaths(
[
["ephemeral", "current", "session"],
["resources", "sessions", true, "relationships", "account", "data", "id"],
["resources", "accounts", true, "attributes", "name"]
]
)(
{
ephemeral: {
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) => {
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
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]
import xs from "xstream"
import view from "@deushack/view"
const state$ = xs.of({
resources: {
programs: {
overload: {
id: "overload",
type: "programs",
attributes: {