I hereby claim:
- I am ca057 on github.
- I am christianost (https://keybase.io/christianost) on keybase.
- I have a public key ASBmdr_2SLX6UID5Ht5-KM71NKvqJigG7uNzNnLvzxMEngo
To claim this, I am signing this object:
| /** | |
| * Asynchronously retry a given task the given times, but as least as long as the task does not | |
| * throw an error or returns the first time. The return value is a promise with the value | |
| * of the rejected/resolved task. | |
| */ | |
| export const retryAsync = (times, task) => { | |
| if (!task || typeof task !== 'function' || times < 0) { | |
| throw new TypeError( | |
| 'No task passed or task is not of type function or times is a negative value.' | |
| ); |
| const duplicates = input => { | |
| if (!Array.isArray(input)) return []; | |
| const workingCopy = [...input]; | |
| const duplicatesSet = new Set(); | |
| // length of 1: no duplicate or already found | |
| while (workingCopy.length > 1) { | |
| const element = workingCopy.shift(); | |
| if (workingCopy.includes(element)) { |
| import { v4 } from 'uuid'; | |
| import { map, is } from 'ramda'; | |
| const isObject = is(Object); | |
| const isDate = is(Date); | |
| const isRegExp = is(RegExp); | |
| export const assignIds = data => { | |
| if (Array.isArray(data)) { | |
| return data.map(assignIds); |
| // @flow | |
| import { flip, concat } from 'ramda'; | |
| type AppendString = | |
| | ((end: string) => (base: string) => string) | |
| | ((end: string, base: string) => string); | |
| /** | |
| * Appends a string to another string, can be used curried. | |
| * | |
| * @example |
| // @flow | |
| import { compose, objOf, mergeAll, map, view, lensProp } from 'ramda'; | |
| type MergeByKey = (key: string) => (Array<Object>) => Object; | |
| /** | |
| * Provided a key, this function returns a function which merges an array of nested objects. | |
| * | |
| * @example | |
| * // Given two objects: | |
| * const data1 = { key: { subStructure1: value1 } }; |
| import React, { PropTypes } from 'react'; | |
| import { | |
| StyleSheet, | |
| View, | |
| Text, | |
| } from 'react-native'; | |
| const styles = StyleSheet.create({ | |
| textContainer: { | |
| flexDirection: 'row', |
I hereby claim:
To claim this, I am signing this object: