made with esnextbin
  
    
      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 React, { Component } from 'react'; | |
| import excEnv from 'react/lib/ExecutionEnvironment'; | |
| import most from 'most' | |
| export default function Stream(streams) { | |
| return DecoratedComponent => { | |
| class StreamComponent extends Component { | |
| constructor(props) { | 
  
    
      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
    
  
  
    
  | var most = require('most'); | |
| var DROP = 0, GRAB = 1, DRAG = 2; | |
| // The thing we want to make draggable | |
| var playground = document.querySelector('.playground'); | |
| var draggable = document.querySelector('.draggable'); | |
| var dragOffset = {}; | |
| // A higher-order stream (stream whose events are themselves streams) | 
  
    
      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
    
  
  
    
  | var most = require('most'); | |
| var DROP = 0, GRAB = 1, DRAG = 2; | |
| // The thing we want to make draggable | |
| var playground = document.querySelector('.playground'); | |
| var draggable = document.querySelector('.draggable'); | |
| var dragOffset = {}; | |
| // A higher-order stream (stream whose events are themselves streams) | 
  
    
      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
    
  
  
    
  | var most = require('most'); | |
| var DROP = 0, | |
| GRAB = 1, | |
| DRAG = 2; | |
| // The thing we want to make draggable | |
| var playground = document.querySelector('.playground'); | |
| var draggable = document.querySelector('.draggable'); | |
| var dragOffset = {}; | 
  
    
      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
    
  
  
    
  | var most = require('most'); | |
| var DROP = 0, GRAB = 1, DRAG = 2; | |
| // The area where we want to do the dragging | |
| var area = document.querySelector('.dragging-area'); | |
| // The thing we want to make draggable | |
| var draggable = document.querySelector('.draggable'); | 
  
    
      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
    
  
  
    
  | var most = require('most'); | |
| var hasTouch = 'ontouchstart' in window; | |
| var dragEvtMap = { | |
| START: hasTouch ? 'touchstart': 'mousedown', | |
| END: hasTouch ? 'touchend' : 'mouseup', | |
| HOVER: hasTouch ? 'touchmove' : 'mousemove' | |
| }; | 
  
    
      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
    
  
  
    
  | // require() some stuff from npm (like you were using browserify) | |
| // and then hit Run Code to run it on the right | |
| var Api = require('anx-api'); | |
| // Create a new instance with api target | |
| var api = new Api({ | |
| target: 'https://api.appnexus.com' | |
| }); | |
| api.login('username', 'password').then(function (token) { | 
  
    
      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
    
  
  
    
  | // hello world | |
| var most = require('most'); | |
| var start = most.fromEvent('mousedown', document); | |
| var end = most.fromEvent('mouseup', document); | |
| var timeWindow = start.constant(end); | 
  
    
      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 {p} from './get-path'; | |
| console.log(p`${'userDesktop'}/MyApp`); | |
| // On Windows | |
| >> C:\Users\TheUser\Desktop\MyApp | |
| // On OS X | |
| >> /Users/TheUser/Desktop/MyApp |