Swiftpack.co - wordpress-mobile/NSObject-SafeExpectations as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by wordpress-mobile.
wordpress-mobile/NSObject-SafeExpectations 0.0.6
No more crashes getting unexpected values from a NSDictionary
⭐️ 19
🕓 51 weeks ago
iOS
.package(url: "https://github.com/wordpress-mobile/NSObject-SafeExpectations.git", from: "0.0.6")

NSObject+SafeExpectations

No more crashes getting unexpected values from a NSDictionary.

Usage

There are a few new methods available for a NSDictionary: see the documentation

  • (NSString *)stringForKey:(id)key;
  • (NSNumber *)numberForKey:(id)key;
  • (NSArray *)arrayForKey:(id)key;
  • (NSDictionary *)dictionaryForKey:(id)key;
  • (id)objectForKeyPath:(NSString *)keyPath;
  • (NSString *)stringForKeyPath:(id)keyPath;
  • (NSNumber *)numberForKeyPath:(id)keyPath;
  • (NSArray *)arrayForKeyPath:(id)keyPath;
  • (NSDictionary *)dictionaryForKeyPath:(id)keyPath;

Wishlist

  • NSArray: stringAtIndex:, numberAtIndex:, arrayAtIndex:, dictionaryAtIndex:
  • Collections support for objectForKeyPath:

GitHub

link
Stars: 19
Last commit: 5 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

0.0.6
51 weeks ago

New Features

  • Add nullability annotation [#14]

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics