I hereby claim:
- I am jktravis on github.
- I am jktravis (https://keybase.io/jktravis) on keybase.
- I have a public key ASBnSUSRq2VafF3mvh7BrVUC1waCoHWIzIGgkLR3V5VBfQo
To claim this, I am signing this object:
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
| if (remix.isAwesome) { | |
| return "Tell your friends"; | |
| } else { | |
| return "Demand a refund!"; | |
| } |
| if (remix.isAwesome) { | |
| return "Tell your friends"; | |
| } else { | |
| return "Demand a refund!"; | |
| } |
| /** | |
| * A "parser" of an object similar to classnames. | |
| * Includes the key and value when the include prop is truthy | |
| * Filters out the key/value otherwise. | |
| */ | |
| const reduce = require('lodash/fp/reduce'); | |
| const toPairs = require('lodash/fp/toPairs'); | |
| const compose = require('lodash/fp/compose'); |
| // I found this somewhere, but cannot remember where. | |
| // feel free to leave a comment if you'd like to claim it. | |
| const wrap = function(min, max, v) { | |
| const rangeSize = max - min; | |
| return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min; | |
| }; |
| class Map extends Component { | |
| loadIncidents = () => { | |
| const { project, baseMapApi } = this.props; | |
| this.incidentEntrySource = new VectorSource({ | |
| format: new GeoJSON(), | |
| url: `${baseMapApi}path/to/resource/${project.id}` | |
| }); | |
| this.incidentEntryLayer = new VectorLayer({ | |
| source: this.incidentEntrySource, |
| const partial1 = function partial(fn) { | |
| // Drop the function from the arguments list and | |
| // fix arguments in the closure. | |
| const args = [].slice.call(arguments, 1); | |
| // Return a new function with fixed arguments. | |
| return function() { | |
| // Combine fixed arguments with new arguments | |
| // and call fn with them. | |
| const combinedArgs = args.concat( |
| // Thanks to Jake Trent for the tip on how to do this | |
| // https://jaketrent.com/post/react-dnd-text-drag-preview/ | |
| // Create the canvas | |
| const c = document.createElement('canvas'); | |
| const ctx = c.getContext('2d'); | |
| const body = document.querySelector('body'); | |
| body.appendChild(c); |
| function handleError (type, error) { | |
| console.error(error); | |
| let payload; | |
| if (typeof error === 'string') { | |
| payload = error; | |
| } else if (error.message) { | |
| payload = error.message; | |
| } | |
| return {type, payload, error: true }; | |
| } |
I hereby claim:
To claim this, I am signing this object: