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 {sample, sampleOne} from 'babel-plugin-transform-flow-to-gen/api'; | |
type Person = { | |
name: string, | |
age: number | |
} | |
// creates a generator | |
const personGen = Person(); |
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
Show hidden characters
{ | |
"presets": ["es-2015"], | |
"plugins": ["syntax-flow"], | |
"env": { | |
"development": { | |
"plugins": ["strip-flow-types"] | |
}, | |
"test": { | |
"plugins": ["flow-to-gen", "strip-flow-types"] | |
} |
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
// From http://stackoverflow.com/questions/11381673/javascript-solution-to-detect-mobile-browser#answer-13819253 | |
var isMobile = { | |
Android: navigator.userAgent.match(/Android/i), | |
BlackBerry: navigator.userAgent.match(/BlackBerry/i), | |
iOS: navigator.userAgent.match(/iPhone|iPad|iPod/i), | |
Opera: navigator.userAgent.match(/Opera Mini/i), | |
Windows: navigator.userAgent.match(/IEMobile/i) || navigator.userAgent.match(/WPDesktop/i) | |
}; |
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
let EventEmitter = require('events').EventEmitter; | |
const CHANGE_EVENT = 'CHANGE_EVENT'; | |
class BaseStore extends EventEmitter { | |
emitChange () { | |
this.emit(CHANGE_EVENT); | |
} | |
addChangeListener (callback) { |
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
<shadow-root style="app/styles/isolated-styles.css"> | |
<div some-directive></div> | |
</shadow-root> |
NewerOlder