Coder Social home page Coder Social logo

funky's Introduction

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;
}];

For the full list of utils, please check out tevelee.github.io/Funky

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.

funky's People

Contributors

tevelee avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.