<commit_before>APAsyncDictionary
============

#### About
APAsyncDictionary is a wrapper on [NSMutableDictionary](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSMutableDictionary_Class/Reference/Reference.html) that performs actions in own [serial queue](https://developer.apple.com/library/ios/documentation/General/Conceptual/ConcurrencyProgrammingGuide/OperationQueues/OperationQueues.html) and return results to caller's thread. And it could be very useful when application uses `dictionary` concurrently from different threads.

#### Features
* Thread safety
* Get object for key asynchronously
* Set object for key
* Set objects and keys from any `NSDictionary`
* Remove object for key
* Remove objects for `NSArray` of keys
* Remove all objects for all keys
* Get objects count asynchronously
* Get all keys asynchronously
* Get all objects asynchronously

#### Installation
Add `APAsyncDictionary` pod to Podfile

#### Using

```objective-c
// instantiation
APAsyncDictionary *dictionary = [[APAsyncDictionary alloc] init];
...
// get object for key
__block id someObject;
[dictionary objectForKey:@"key" callback:^(id <NSCopying> key, id object)
{
    someObject = object;
    // do something with object
}];
...
// set object
[dictionary setObject:object forKey:@"key"];
...
// set objects and keys from dictionary
[dictionary setObjectsAndKeysFromDictionary:@{@"key1" : object1, @"key2" : object2}];
...
// remove object for key
[dictionary removeObjectForKey:@"key"];
...
// remove objects for keys from array
[dictionary removeObjectsForKeys:@[@"key1", @"key2"]];
...
// remove all objects
[dictionary removeAllObjects];
...
// objects count
[dictionary objectsCountCallback:^(NSUInteger count)
{
    // do somethig with count    
}];
...
// all keys
[dictionary allKeysCallback:^(NSArray *keys)
{
    // do something with keys
}];
...
// all objects
[dictionary allObjectsCallback:^(NSArray *objects)
{<commit_msg>Fixed typo in readme<commit_after>APAsyncDictionary
============

#### About
APAsyncDictionary is a wrapper on [NSMutableDictionary](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSMutableDictionary_Class/Reference/Reference.html) that performs actions in own [serial queue](https://developer.apple.com/library/ios/documentation/General/Conceptual/ConcurrencyProgrammingGuide/OperationQueues/OperationQueues.html) and return results to caller's thread. And it could be very useful when application uses `dictionary` concurrently from different threads.

#### Features
* Thread safety
* Get object for key asynchronously
* Set object for key
* Set objects and keys from any `NSDictionary`
* Remove object for key
* Remove objects for `NSArray` of keys
* Remove all objects for all keys
* Get objects count asynchronously
* Get all keys asynchronously
* Get all objects asynchronously

#### Installation
Add `APAsyncDictionary` pod to Podfile

#### Using

```objective-c
// instantiation
APAsyncDictionary *dictionary = [[APAsyncDictionary alloc] init];
...
// get object for key
__block id someObject;
[dictionary objectForKey:@"key" callback:^(id <NSCopying> key, id object)
{
    someObject = object;
    // do something with object
}];
...
// set object
[dictionary setObject:object forKey:@"key"];
...
// set objects and keys from dictionary
[dictionary setObjectsAndKeysFromDictionary:@{@"key1" : object1, @"key2" : object2}];
...
// remove object for key
[dictionary removeObjectForKey:@"key"];
...
// remove objects for keys from array
[dictionary removeObjectsForKeys:@[@"key1", @"key2"]];
...
// remove all objects
[dictionary removeAllObjects];
...
// objects count
[dictionary objectsCountCallback:^(NSUInteger count)
{
    // do something with count    
}];
...
// all keys
[dictionary allKeysCallback:^(NSArray *keys)
{
    // do something with keys
}];
...
// all objects
[dictionary allObjectsCallback:^(NSArray *objects)
{
{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.003036437246963563, 'mean_word_length': 4.935435435435435, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5639118', 'n_tokens_mistral': 1130, 'n_tokens_neox': 1049, 'n_words': 353}