最近生活リズム崩れて困る
- 寝坊
- 用事してたら意外と時間経ってた
- 早起きすれば解決
- 正当な理由なら裁量
| const yo = require('yo-yo') | |
| const url = require('url') | |
| const http = require('http') | |
| const app = http.createServer((req, res) => { | |
| const q = url.parse(req.url, true).query | |
| res.setHeader('content-type', 'text/html; charset=utf-8') | |
| res.end(String(yo `<body><main><h1>${q.test}</h1></main></body>`)) | |
| }) |
| const xtend = require('xtend') | |
| const d = require('global/document') | |
| const domcss = require('dom-css') | |
| const app = require('yo-yo-bind') | |
| const WHITESTAR = 'fa fa-star-o' | |
| const BLACKSTAR = 'fa fa-star' | |
| const reduce = (state, action, type) => { | |
| if (type === 'CLEAR') { |
| var xtend = require('xtend') | |
| var yo = require('yo-yo') | |
| var d = require('global/document') | |
| var app = require('./index') | |
| var create = (state, dispatcher) => yo ` | |
| <main> | |
| <button onclick=${ev => dispatcher('UPDATE', +1)}>inc</button> | |
| <button onclick=${ev => dispatcher('UPDATE', -1)}>dec</button> | |
| <p>${state.count}</p> |
| 'use strict' | |
| var http = require('http') | |
| var path = require('path') | |
| var ecstatic = require('ecstatic')(path.join(__dirname, 'static')) | |
| var websocket = require('websocket-stream') | |
| var response = require('blue-frog-core/response') | |
| var router = require('../index')() | |
| router.add('echo', (params, result, done) => { | |
| process.nextTick(() => { |
| var hyperquest = require('hyperquest') | |
| var through = require('through2') | |
| var frog = require('blue-frog-b') | |
| var rpc = require('blue-frog-stream') | |
| window.onload = function () { | |
| var hyp = hyperquest.post('http://0.0.0.0:9999/rpc') | |
| var stream = frog() | |
| hyp.on('error', onError) |
| module.exports = Observer | |
| function Observer () { | |
| this.subs = [] | |
| } | |
| Observer.prototype.publish = function () { | |
| var args = [].slice.apply(arguments) | |
| for (var i = 0; i < this.subs.length; i++) { | |
| this.subs[i].apply(null, args) |
| function Client () { | |
| this.validators = [].slice.apply(arguments).filter(flt) | |
| } | |
| function flt (validator) { | |
| return 'function' === typeof (validator || {}).request | |
| } | |
| Client.prototype.request = function (input) { | |
| for (var i = 0; i < this.validators.length; i++) { | |
| this.validators[i].request(input) |
| var stream = require('readable-stream') | |
| var inherits = require('inherits') | |
| var eos = require('end-of-stream') | |
| function Lazy () { | |
| if (!(this instanceof Lazy)) return new Lazy | |
| stream.Readable.call(this) | |
| this.onWorks = [] | |
| this.count = 0 | |
| } |