Chrome Tech Talk Night #8 - connpass
Chrome Tech Talk Night #8 を開催します - Google Developer Japan Blog
こちらのイベントに来ているので、メモ取っていく。英語の講演だから間違ってるかもしれないっす。
var uniqueArray = function(arrArg) { | |
return arrArg.filter(function(elem, pos,arr) { | |
return arr.indexOf(elem) == pos; | |
}); | |
}; | |
var uniqEs6 = (arrArg) => { | |
return arrArg.filter((elem, pos, arr) => { | |
return arr.indexOf(elem) == pos; | |
}); |
Chrome Tech Talk Night #8 - connpass
Chrome Tech Talk Night #8 を開催します - Google Developer Japan Blog
こちらのイベントに来ているので、メモ取っていく。英語の講演だから間違ってるかもしれないっす。
var React = require('react'); | |
var cx = require('classnames'); | |
var vjs = require('video.js'); | |
var _forEach = require('lodash/collection/forEach'); | |
var _debounce = require('lodash/function/debounce'); | |
var _defaults = require('lodash/object/defaults'); | |
var DEFAULT_HEIGHT = 800; | |
var DEFAULT_WIDTH = 600; | |
var DEFAULT_ASPECT_RATIO = (9 / 16); |
GitHubのWatch機能はそのリポジトリに対するContributor向けの機能風味なので、 数が多くなると一瞬で破綻してしまう問題がある。
特にメールで購読しようとするのは無理なので、ウォッチしたくてWatchを安易に使うのは疲れてしまうので別の手段を考えよう。
ライブラリの更新だけをチェックしたいだけなら、GitHubにはリポジトリのリリース(tag or releaseページ)のRSSがあるのでこちらを活用しましょう。
String.isNyaN = function (val) { | |
if (typeof val !== 'string') return false; | |
var nyan = ['cat', 'kitty', 'kitten', 'doraemon', '🐱', '😿', '😺', '😸', '😼', '😹', '😻', '😽', '😾', '🙀']; | |
return nyan.indexOf(val.toLowerCase()) !== -1; | |
} |
Reposted from Qiita
For almost a year now, I've been using this "flux" architecture to organize my React applications and to work on other people's projects, and its popularity has grown quite a lot, to the point where it shows up on job listings for React and a lot of people get confused about what it is.
There are a billion explainations on the internet, so I'll skip explaining the parts. Instead, let's cut to the chase -- the main parts I hate about flux are the Dispatcher and the Store's own updating mechanism.
If you use a setup similar to the examples in facebook/flux, and you use flux.Dispatcher, you probably have this kind of flow:
{ | |
"env": { | |
"browser": true, | |
"node": true, | |
"es6": true | |
}, | |
"plugins": ["react"], | |
"ecmaFeatures": { |
<!-- MIT License --> | |
<html> | |
<head> | |
<script> | |
function generateKey(alg, scope) { | |
return new Promise(function(resolve) { | |
var genkey = crypto.subtle.generateKey(alg, true, scope) | |
genkey.then(function (pair) { | |
resolve(pair) | |
}) |