Latest 1.3
Homepage https://github.com/tevelee/Funky
License MIT
Platforms ios 7.0, osx 10.9, watchos 2.0, tvos 9.0
Authors

Funky

CI Status
Code coverage
Documentation
Version
License
Platform
Language

Funky is a functional utility library written in Objective-C.

It provides a set of extension methods on NSArray, NSDictionary and NSSet for you to help dealing with common operations (usually in a functional way).

Documentation

Full documentation is available at tevelee.github.io/Funky

Installation with CocoaPods

CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. You can install it with the following command:

$ sudo gem install cocoapods

To install Funky, simply add the following line to your Podfile:

pod "FunkyObjC"

then import using any of these

#import <Funky/NSArray+FunkyUtilities.h>
#import <Funky/NSDictionary+FunkyUtilities.h>
#import <Funky/NSSet+FunkyUtilities.h>

Usage

The framework contains a set of extension methods on NSArray, NSSet and NSDictionary.

Using them is as simle as

NSArray<NSNumber*>* numbers = @[@1, @2, @3];
NSArray<NSString*>* strings = [numbers map:^id(NSNumber* item) {
    return item.stringValue;
}];

or

bigNumbers = [numbers filter:^BOOL(NSNumber* item) {
    return item.intValue > 1000;
}];

Click here for the full list of utils, or visit tevelee.github.io/Funky for a detailed documentation

The framework includes some cool nil-tolerant collection behaviours as well:

NSArray* array = @[@0, @1, @2].nilTolerant;
NSLog(@"Items: %@", [array arrayByAddingObject:nil]);

Again, see the docs for more details

Help & Bug Reporting

In case you need help or want to report a bug – please file an issue. Make sure to provide as much information as you can, sample code also makes it a lot easier for me to help you.

Contribution

Anyone is more than welcome to contribute to Funky! It even can be an addition to the docs or to the code directly, by raising an issue or in form of a pull request. Both are equally valuable to me!

Future plans

Roadmap

  • Figuring out ways for lazy collections, so the order of map/filter/take won’t matter and always compute only the most necessary computations. So if you operate a map function on a huge array, but at the end you filter only for a few, the mapping should only take effect on the very few you needed.

General guidelines

  • Active maintenance
  • Keep the >95% test and documentation coverage
  • Accepting suggestions and pull requests from the community

Author

I am Laszlo Teveli, software engineer, iOS evangelist.

Feel free to reach out to me anytime via tevelee [at] gmail [dot] com.

License

Funky is available under the MIT license. See the LICENSE file for more information.

Latest podspec

{
    "name": "FunkyObjC",
    "version": "1.3",
    "summary": "Funky is a collection utility with functional extensions.",
    "description": "Funky is a utility helper library to help dealing with common array, set and dictionary operations easier. It provides a set of extensions, functional helpers, and even data types to help dealing with nil values in collections. All operations are well unit-tested, so you can rely on the helpers and structures in production code as well.",
    "homepage": "https://github.com/tevelee/Funky",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Laszlo Teveli": "[email protected]"
    },
    "source": {
        "git": "https://github.com/tevelee/Funky.git",
        "tag": "1.3"
    },
    "header_dir": "Funky",
    "module_name": "Funky",
    "platforms": {
        "ios": "7.0",
        "osx": "10.9",
        "watchos": "2.0",
        "tvos": "9.0"
    },
    "subspecs": [
        {
            "name": "Core",
            "source_files": "Source/Core/**/*",
            "public_header_files": [
                "Source/Core/Public/*.h",
                "Source/Core/Public/**/*.h"
            ],
            "private_header_files": [
                "Source/Core/Private/*.h",
                "Source/Core/Private/**/*.h"
            ]
        },
        {
            "name": "Collections",
            "dependencies": {
                "FunkyObjC/Core": []
            },
            "subspecs": [
                {
                    "name": "Array",
                    "source_files": [
                        "Source/Collections/Array/**/*",
                        "Source/Collections/Common/**/*"
                    ],
                    "public_header_files": [
                        "Source/Collections/Array/*.h",
                        "Source/Collections/Array/**/*.h"
                    ]
                },
                {
                    "name": "Set",
                    "source_files": [
                        "Source/Collections/Set/**/*",
                        "Source/Collections/Common/**/*"
                    ],
                    "public_header_files": [
                        "Source/Collections/Set/*.h",
                        "Source/Collections/Set/**/*.h"
                    ]
                },
                {
                    "name": "Dictionary",
                    "source_files": [
                        "Source/Collections/Dictionary/**/*",
                        "Source/Collections/Common/**/*"
                    ],
                    "public_header_files": [
                        "Source/Collections/Dictionary/*.h",
                        "Source/Collections/Dictionary/**/*.h"
                    ]
                }
            ]
        },
        {
            "name": "Interface",
            "dependencies": {
                "FunkyObjC/Core": []
            },
            "subspecs": [
                {
                    "name": "Object",
                    "source_files": "Source/Interface/Object/**/*"
                },
                {
                    "name": "Array",
                    "source_files": "Source/Interface/Array/**/*"
                },
                {
                    "name": "Set",
                    "source_files": "Source/Interface/Set/**/*"
                },
                {
                    "name": "Dictionary",
                    "source_files": "Source/Interface/Dictionary/**/*"
                }
            ]
        },
        {
            "name": "PrefixedInterface",
            "dependencies": {
                "FunkyObjC/Core": []
            },
            "subspecs": [
                {
                    "name": "Object",
                    "source_files": "Source/PrefixedInterface/Object/**/*"
                },
                {
                    "name": "Array",
                    "source_files": "Source/PrefixedInterface/Array/**/*"
                },
                {
                    "name": "Set",
                    "source_files": "Source/PrefixedInterface/Set/**/*"
                },
                {
                    "name": "Dictionary",
                    "source_files": "Source/PrefixedInterface/Dictionary/**/*"
                }
            ]
        }
    ]
}

Pin It on Pinterest

Share This