I hereby claim:
- I am commanda on github.
- I am commanda (https://keybase.io/commanda) on keybase.
- I have a public key whose fingerprint is 74DB ACD4 CD18 915F E6E2 7C50 4E57 2F26 885B CA13
To claim this, I am signing this object:
| function traverse(object, block) | |
| { | |
| for(var i in object) | |
| { | |
| block(typeof(object[i]) !== "object", i, object[i]); | |
| if(object[i] !== null && typeof(object[i]) !== "string") | |
| { | |
| traverse(object[i], block); | |
| } | |
| } |
| + (BOOL)traverse:(NSObject *)obj comparisonBlock:(BOOL (^)(NSString *, NSObject *))comparisonBlock; | |
| { | |
| if([obj isKindOfClass:[NSMutableArray class]]) | |
| { | |
| NSMutableArray *array = (NSMutableArray *)obj; | |
| NSMutableArray *toDelete = [@[] mutableCopy]; | |
| for(NSObject *element in array) | |
| { |
| function createPromiseForFunction(e, functionThatTakesOneItem) | |
| { | |
| return new Promise((resolve, reject) => { | |
| resolve(functionThatTakesOneItem(e)); | |
| }); | |
| } |
I hereby claim:
To claim this, I am signing this object:
| extension UIView { | |
| var allSubviews: [UIView] { | |
| return self.subviews.reduce(into: [self]) { array, subview in | |
| array += subview.allSubviews | |
| } | |
| } | |
| } |
| extension String { | |
| var isHexColorString: Bool { | |
| do { | |
| let regex = try NSRegularExpression(pattern: "^#?[0-9A-Fa-f]{6}$") | |
| return regex.matches(in: self, options: [], range: wholeRange).isEmpty == false | |
| } catch { | |
| return false | |
| } | |
| } | |
| } |