View preact-set-state.js
import { h, Component } from 'preact'
import style from './style'
import state from 'set-state'
const toInteger = n => (isNaN(n) ? 0 : parseInt(n || 0, 10))
// raw count state with default
const count = state(0)
// collects events used to set count
const setCount = state()
// projection of count as integer
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Hello World Streaming JSON Client</title>
<script src="https://rawgit.com/jimhigson/oboe.js/master/dist/oboe-browser.min.js"></script>
</head>
<body>
View dlv.js
//obj,path,default
function dlv(l,t,o,d){for(d=0,t=t.split?t.split("."):t;l&&d<t.length;)l=l[t[d++]];return void 0===l?o:l}
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

View debug.filename.js
const debug = require('debug')(__filename.replace(/^.*[/]([^.]+)\.js/, '$1')) // file-name
const debug = require('debug')(__filename.replace(/^.*[/](.*)[/]([^.]+)\.js/, '$1:$2')) // folder:file-name
View install.md

getting-started

(from guest wireless)

  • install homebrew
    • /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    • install cask
      • brew tap caskroom/cask
  • install nvm
    • brew install nvm
View mem.js
import {List} from 'immutable'
export default fn => {
const cache = {}
const cacheKey = List()
return function (...args) {
const hashCode = cacheKey.push(this, ...args).hashCode()
if (!(hashCode in cache)) {
cache[hashCode] = fn.apply(this, args)
}
View 1.js
const getUser = async $id => {
const id = await Promise.resolve($id);
return new Promise((resolve, reject) => {
setTimeout(() => resolve({id}), 100);
});
}
const asyncId = new Promise((resolve, reject) => {
setTimeout(() => resolve(5), 100);
});
View x.js
document.addEventListener('focus', function (e) {console.clear(); console.log(e.target)}, true);