Skip to content

Instantly share code, notes, and snippets.

@chauthai
chauthai / rndriver.js
Last active February 12, 2017 13:09
React Native Lowdb Driver
export default {
read: () =>
{
return require('./db.json');
}
};
@chauthai
chauthai / browser-stderr.js
Created November 27, 2015 15:38
A node polyfill for process.stderr in a browser
var WritableStream = require('stream');
var inherits = require('util').inherits;
module.exports = BrowserStderr;
inherits(BrowserStderr, WritableStream);
function BrowserStderr(opts) {
if (!(this instanceof BrowserStderr)) return new BrowserStderr(opts);
import _ from 'lodash';
import React from 'react';
import clamp from './clamp.js';
import dimensions from './dimensions.js';
class Scroller extends React.Component {
static propTypes = {
onScroll: React.PropTypes.func,
onNearTop: React.PropTypes.func,
target: React.PropTypes.object,