Skip to content

Commit

Permalink
Add expected space before headings
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Araújo authored and hectormatos2011 committed May 26, 2017
1 parent 0183b30 commit 566eb51
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat-square)](https://github.com/Carthage/Carthage)
[![LICENSE](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://raw.githubusercontent.com/KrakenDev/PrediKit/master/LICENSE)

#PrediKit
# PrediKit
A Swift `NSPredicate` DSL for iOS & OS X inspired by [SnapKit](https://github.com/SnapKit/SnapKit), lovingly written in Swift, and created by that weird dude at [KrakenDev](https://krakendev.io).

If you're familiar with the intuitive feel of the [SnapKit](https://github.com/SnapKit/SnapKit) API, then you'll feel right at home with PrediKit! 💖

#Documentation
# Documentation
Documentation is generated by [Jazzy](https://github.com/realm/jazzy) and can be found [here for your convenience](http://krakendev.github.io/PrediKit)!

#Why create PrediKit?
# Why create PrediKit?
Because I wanted to! Also, because `NSPredicate` creation is hard. When working with `CoreData` you use `NSPredicates` to fetch persisted objects. `CoreData` is hard enough, so why have the additional complexity of using a complex string-based predicate system?

The language you need to use to create predicate formats are completely string-based which can lead to a host of issues:
Expand All @@ -24,15 +24,15 @@ The language you need to use to create predicate formats are completely string-b
* With complex predicate creation, it's easy to get string-blindness. Go ahead...try creating a complex predicate and reading it after a couple of hours. I dare you. 😎
* If you misspell a property key name in a predicate format string but the string is parseable by the `NSPredicate` system, then nothing happens. It just fails silently. At least, I think it does. I'm currently writing this on 2 hours of sleep. Don't quote me on that.

#What does it fix?
# What does it fix?
Well, hopefully it fixes all of the above and more. Currently, it:
* Gives the developer a closure based way to create NSPredicates.
* It also, through the magic of Xcode, gives you a way to autocomplete your queries. No more referencing a cheatsheet. Just hit the dot button and enjoy the autocomplete.
* I also carefully constructed the API to read as much like a book as possible. Matching strings even have a redundant API just to be grammatically correct when specifying if a string `matches` or `doesNot.match` another value.
* Through a little runtime-magic/reflection, PrediKit will crash at runtime if you misspell a property key or supply a property key that does not exist in a specific class' property list.
* All predicate `builder` closures do not need capture semantics as each closure is a `@noescape` closure. [Read here if you don't know what that means](http://krakendev.io/blog/hipster-swift#noescape) 🤓.

#Installation
# Installation
PrediKit can be included in your project through any of these methods:

## CocoaPods
Expand Down Expand Up @@ -99,7 +99,7 @@ Afterwards, whenever you need PrediKit, add this line to the top of the file it'
import PrediKit
```

##Manually
## Manually

If you prefer not to use either of the aforementioned dependency managers, you can integrate PrediKit into your project manually.

Expand All @@ -113,7 +113,7 @@ This should open a Finder window with the important files needed for PrediKit lo

The downside to this is that you can not update PrediKit easily. You would need to repeat these steps each time you wanna grab the latest and greatest! 😱

#Usage
# Usage

***PSA: IF YOU HATE STRINGLY TYPED APIs LIKE I DO, THEN CHECK OUT THE SECTION ON SWIFT 3's #keyPath() AT THE BOTTOM OF THE README!!!***

Expand Down Expand Up @@ -256,5 +256,5 @@ let predicate = NSPredicate(ManagedLegend.self) { includeIf in
}
```

#LICENSE
# LICENSE
PrediKit is licensed under the `MIT` license. Check out the `LICENSE` file to learn more.

0 comments on commit 566eb51

Please sign in to comment.