Skip to content

Instantly share code, notes, and snippets.

diff --git a/node_modules/sentry-expo/build/integrations/bare.js b/node_modules/sentry-expo/build/integrations/bare.js
index 9d48f14..fa22c54 100644
--- a/node_modules/sentry-expo/build/integrations/bare.js
+++ b/node_modules/sentry-expo/build/integrations/bare.js
@@ -77,9 +77,10 @@ class ExpoBareIntegration {
// The name of the sourcemap file in Sentry is different depending on whether it was uploaded
// by the upload-sourcemaps script in this package (in which case it will have a revisionId)
// or by the default @sentry/react-native script.
- let sentryFilename;
- sentryFilename = react_native_1.Platform.OS === 'android' ? 'index.android.bundle' : 'main.jsbundle';
// Stores a hypercore feed & a hypertrie inside a hypertrie.
// The feed is stored under the prefix "feed/"
// The trie is stored under the prefix "key-value/"
const hypercore = require('hypercore')
const hypertrie = require('hypertrie')
const rakv = require('random-access-key-value')
const ram = require('random-access-memory')
function hypertrieStorage(hypertrie, prefix) {
@lachenmayer
lachenmayer / readme.js
Created April 22, 2018 17:00
persist-object-property
// Transparently persist an object property in localStorage.
// Usage:
// persist(state, 'backgroundColor')
// console.log(state.backgroundColor) // you can access the property on the object as usual.
// state.backgroundColor = 'red' // the value will persist across sessions.
module.exports = function persist(obj, key) {
Object.defineProperty(obj, key, {
get: () => localStorage.getItem(key),
set: value => localStorage.setItem(key, value),
})
@lachenmayer
lachenmayer / offlineLink.js
Created February 7, 2018 17:14
Sketch of an implementation for a possible apollo-link-offline module with similar behavior to apollo-offline.
Verifying my Blockstack ID is secured with the address 1jjgb5JPRsMQShn3SrAUD3e82mS3eFQmh https://explorer.blockstack.org/address/1jjgb5JPRsMQShn3SrAUD3e82mS3eFQmh
@lachenmayer
lachenmayer / example1.js
Created December 1, 2017 13:28
WebDB/DatArchive API woes
const DatArchive = require('node-dat-archive')
const WebDb = require('@beaker/webdb')
const webdb = new WebDb('./index', { DatArchive })
webdb.define('foo', {
schema: {
type: 'object',
properties: {
foo: { type: 'string' },
// @flow
import React, {Component} from 'react'
import {
View,
Dimensions,
Animated,
StatusBar,
Platform,
PanResponder,
Text,
@lachenmayer
lachenmayer / stream-to-xstream.js
Created April 5, 2017 12:02
converting xstream to/from node streams
const xs = require('xstream').default
module.exports = function fromStream (stream, flush = stream => {}) {
return xs.create({
start: listener => {
stream.on('data', data => { listener.next(data) })
stream.on('error', error => { listener.error(error) })
stream.on('end', () => { listener.complete() })
},
stop: () => {
@lachenmayer
lachenmayer / README.md
Created November 16, 2016 15:27
Jest carriage return bug

To reproduce:

  1. Run ./node_modules/.bin/jest - a snapshot is created in ./__snapshots__/
  2. Run ./node_modules/.bin/jest again.

Expected:

The test should pass.

Actual:

@lachenmayer
lachenmayer / pull-ws-bug.js
Created September 20, 2016 22:27
pull-ws-bug
const connect = require('pull-ws/client')
const pull = require('pull-stream')
const {source} = connect('ws://localhost:1337', (err, stream) => {
pull(
stream,
pull.log()
)
// expected: log 'hello!'
// actual: stream is undefined