I hereby claim:
- I am sebringj on github.
- I am jasonsebring (https://keybase.io/jasonsebring) on keybase.
- I have a public key whose fingerprint is C7D8 CC6F F1DB 9014 9A6A E34E C7D8 74CD 6848 F3EE
To claim this, I am signing this object:
info: Welcome to Nodejitsu | |
info: jitsu v0.9.8 | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command users confirm zipstory edb7fe3a-56e8-4442-8423-e90c105ea543 | |
info: Confirming user zipstory | |
error: Error running command users confirm zipstory edb7fe3a-56e8-4442-8423-e90c105ea543 | |
error: Nodejitsu Error (400): Bad Request | |
error: connect ECONNREFUSED | |
help: For help with this error contact Nodejitsu Support: | |
help: webchat: <http://webchat.nodejitsu.com/> |
'use strict'; | |
var _ = require('lodash'); | |
var React = require('react'); | |
var ReactDOM = require('react-dom'); | |
var THROTTLE_TIME = 250; | |
var InfiniteChild = React.createClass({ | |
getInitialState: function() { |
I hereby claim:
To claim this, I am signing this object:
class TinyStore { | |
constructor(key) { | |
this._events = {}; | |
this._data = undefined; | |
this._key = key; | |
} | |
on(evt, fn) { | |
let list = this._events[evt] = this._events[evt] || []; | |
for (let fnItem of list) |
async function promiseMapAll(promiseMap) { | |
const keys = Object.keys(promiseMap); | |
const promises = keys.map(key => promiseMap[key]); | |
const promisesArr = await Promise.all(promises); | |
let objMapped = {}; | |
keys.forEach((key, i) => { | |
objMapped[key] = promisesArr[i]; | |
}); | |
return objMapped; | |
} |
/* | |
use like so: | |
const lookupList = new LookupList({ a: 1 }, { b: 2 }, { c: 3 }) | |
console.log(lookupList.valueByKey('a')) // 1 | |
console.log(lookupList.keyByValue(1)) // "a" | |
console.log(lookupList.keysByValue(1)) // ["a"] | |
console.log(lookupList.valueByIndex(0)) // 1 | |
console.log(lookupList.keyByIndex(0)) // "a" |
/* | |
use like so: | |
let keyList = getKeyList("a", "b", "c") | |
console.log(keyList[0]) // "a" | |
console.log(keyList.index["a"]) // 0 | |
*/ | |
function getKeyList() { | |
let arr = [].slice.call(arguments); |
// VIEW ON JSFIDDLE -> https://jsfiddle.net/v5scgqao/3/ | |
/* | |
flattens array without mutation | |
*/ | |
function flattenArray(arr) { | |
let arr2 = [] | |
function flatten(a) { | |
for (let i = 0; i < a.length; i++) { | |
if (Array.isArray(a[i])) | |
flatten(a[i]) |
'use strict'; | |
var self = this || global; | |
// Polyfill from https://github.com/github/fetch/blob/v1.1.1/fetch.js#L8-L21 | |
var support = { | |
searchParams: 'URLSearchParams' in self, | |
iterable: 'Symbol' in self && 'iterator' in Symbol, | |
blob: 'FileReader' in self && 'Blob' in self && (function() { | |
try { |
function textFromJson(json) { | |
if (json === null || json === undefined) { | |
return ''; | |
} | |
if (!Array.isArray(json) && !Object.getPrototypeOf(json).isPrototypeOf(Object)) { | |
return '' + json; | |
} | |
const obj = {}; | |
for (const key of Object.keys(json)) { | |
obj[key] = textFromJson(json[key]); |