I hereby claim:
- I am acjr1910 on github.
- I am acjr1910 (https://keybase.io/acjr1910) on keybase.
- I have a public key ASAiUI2qF3OHVSozGU-9aQ2-bhlmdv7D2ouGnHz0Tbzk8Ao
To claim this, I am signing this object:
import ReactNativeBlobUtil from 'react-native-blob-util'; | |
describe('SomeTest', () => { | |
beforeEach(() => { | |
jest.clearAllMocks(); | |
}); | |
it('handles errors', () => { | |
ReactNativeBlobUtil.config.mockReturnValueOnce({ | |
fetch: jest.fn().mockReturnValue({ |
/** | |
* custom wrapper for AsyncStorage that splits the data of a given storageKey to smaller chunks | |
* a large object with multiple keys will be spreaded to all the keys in the first level of the main object | |
* { data: { key1: value1, key2: value2, ...} } | |
* will be saved as key1 => value1, key2 => value2, ... | |
* this approach is intended to prevent the limitation of 2MB per value of AsyncStorage by spreading the values across the storage | |
* | |
* basic usage: | |
* | |
* import AsyncStorage from '@react-native-community/async-storage'; |
const isValidRange = (arr) => { | |
let previous = null; | |
const isLessThanPrevious = (curr) => { | |
if (previous == null) { | |
previous = curr; | |
return true; | |
} | |
if (previous - 1 == curr) { | |
previous = curr; |
I hereby claim:
To claim this, I am signing this object:
const obj = { | |
total_history: { | |
current_balance: 90, | |
funds: [ | |
{ | |
uuid: 'abd16f0a-9ae4-11ea-ad4d-0a334120f7c0', | |
name: 'Front RVT FIC FI Renda Fixa', | |
}, | |
], | |
}, |
const path = require("path"); | |
const AWS = require("aws-sdk"); | |
const S3 = new AWS.S3({ | |
signatureVersion: "v4", | |
}); | |
const Sharp = require("sharp"); | |
const BUCKET = "some-bucket"; | |
const QUALITY = 75; |
const userAgent = require("useragent"); | |
const path = require("path"); | |
exports.handler = async (event, context, callback) => { | |
const request = event.Records[0].cf.request; | |
const headers = request.headers; | |
const userAgentString = | |
headers["user-agent"] && headers["user-agent"][0] | |
? headers["user-agent"][0].value | |
: null; |
window.addEventListener("beforeunload", function() { debugger; }, false) |
const Right = x => | |
({ | |
chain: f => f(x), | |
map: f => Right(f(x)), | |
fold: (f, g) => g(x), | |
toString: () => `Right(${x})` | |
}) | |
const Left = x => | |
({ |
function curry(arity, fn) { | |
return (function nextCurried(prevArgs) { | |
return function curried(nextArg) { | |
var args = prevArgs.concat([nextArg]); | |
if (args.length >= arity) { | |
return fn(...args); | |
} else { | |
return nextCurried(args); | |
} | |
}; |