4 "summary": "Safe Casting in Objective-C",
5 "description": " * Cast in Objective-C, not in C\n * Be Safe\n * Be Concice\n \n Objective-C is C, and C can be perilous. Don't blindly cast objects. Stick to high-level language features, and write more readable code.\n \n Quite simply, you can do things like this:\n \n ```\n NSMutableArray *mArray = [NSMutableArray safe_cast:array];\n // `mArray` is `nil` if `array` is not a mutable array, and is `array` if it is mutable.\n ```\n \n Or only perform a selector if the target responds to it without an explicit check:\n \n ```\n [array safe_makeObjectsSafelyPerformSelector:@selector(method)];\n ```\n \n Or enumerate with a block on objects that are of a specific kind:\n \n ```\n [array safe_enumerateObjectsOfKind:[MyObject class]\n usingBlock:^(MyObject *obj, NSUInteger idx, BOOL *stop) {\n [obj setNumber:@3];\n }];\n ```\n \n And lots of other similar methods on standard collections.\n",
6 "homepage": "https://github.com/fcanas/SafeCast",
12 "Fabian Canas": "fcanas@gmail.com"
14 "social_media_url": "http://twitter.com/fcanas",
21 "git": "https://github.com/fcanas/SafeCast.git",
28 "public_header_files": [
29 "Classes/NSArray+SafeCast.h",
30 "Classes/NSDictionary+SafeCast.h",
31 "Classes/NSObject+SafeCast.h",
32 "Classes/NSOrderedSet+SafeCast.h",
33 "Classes/NSSet+SafeCast.h",
35 "Classes/SafeCastCollections.h"