Skip to content

Instantly share code, notes, and snippets.

'''
phone number regex
-------------------'''
def isPhoneNumber(text):
if len(text) != 12:
return False #not phone number-sized
for i in range(0, 3):
if not text[i].isdecimal():
return False
@yonglam
yonglam / TZReceptionist.h
Created February 2, 2019 11:59 — forked from pala/TZReceptionist.h
Receptionist Pattern
#import <Foundation/Foundation.h>
typedef void (^RCTaskBlock)(NSString *keyPath, id object, NSDictionary *change);
@interface TZReceptionist : NSObject
+ (id)receptionistForKeyPath:(NSString *)path
object:(id)obj
queue:(NSOperationQueue *)queue
task:(RCTaskBlock)task;
@end