function pubsubber() {
const subscribers = []
return {
subscribe,
once,
publish
}
This file contains 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
node_modules |
This file contains 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
[ | |
{ | |
"op": "replace", | |
"path": [ | |
"nodes", | |
"0", | |
"nodes", | |
"0", | |
"characters", | |
"8", |
This file contains 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
export default function replayer(array, opts = {}, emit) { | |
let idx = 0 | |
let timer | |
return { | |
start: next, | |
stop: stop, | |
reset: reset | |
} |
This file contains 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 url from 'url' | |
export default Object.assign(configure(), configure) | |
function configure({qsImpl} = {}) { | |
return { | |
parse(urlToParse) { | |
return Object.assign(createUrlObject({qsImpl}), { | |
href: urlToParse | |
}) |
This file contains 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
.DS_Store | |
npm-debug.log | |
node_modules |
This file contains 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
const assert = require("assert"); | |
function skipSingleKeys(obj) { | |
if (obj === null || typeof obj !== 'object') { | |
return obj; | |
} | |
const keys = Object.keys(obj); | |
if (keys.length == 1) { | |
return skipSingleKeys(obj[keys[0]]); | |
} |
This file contains 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
const Rx = require('rx'); | |
const csv = require('csv-parse'); | |
const fs = require('fs'); | |
Rx.Node.fromReadableStream(fs.createReadStream('file.csv').pipe(csv())) | |
.skip(1) | |
.withLatestFrom(rows.take(1), (row, header) => { | |
// Map header[i] => row[i] | |
return row.reduce((rowObj, cell, i) => { | |
rowObj[header[i]] = cell; |
This file contains 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
.playerContainer { | |
position: relative; | |
} | |
.playerContainer object { | |
height: 100%; | |
left: 0; | |
top: 0; | |
position: absolute; | |
width: 100%; |
This file contains 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 concat = require('concat-stream'); | |
function parseCSV(file) { | |
var parser = csvParse({ | |
delimiter: ',', | |
auto_parse: true, | |
columns: true | |
}); | |
return new Promise(function(resolve, reject) { |