NSDictionary+JKBlock.h 595 B

1234567891011121314151617181920212223
  1. //
  2. // NSDictionary+JKBlock.h
  3. // JKCategories (https://github.com/shaojiankui/JKCategories)
  4. //
  5. // Created by Jakey on 15/5/22.
  6. // Copyright (c) 2015年 www.skyfox.org. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @interface NSDictionary (JKBlock)
  10. #pragma mark - RX
  11. - (void)jk_each:(void (^)(id k, id v))block;
  12. - (void)jk_eachKey:(void (^)(id k))block;
  13. - (void)jk_eachValue:(void (^)(id v))block;
  14. - (NSArray *)jk_map:(id (^)(id key, id value))block;
  15. - (NSDictionary *)jk_pick:(NSArray *)keys;
  16. - (NSDictionary *)jk_omit:(NSArray *)key;
  17. - (BOOL)jk_hasKey:(NSString *)key;
  18. @end