<commit_before>![Palau: NSUserDefaults with Wings!](https://raw.githubusercontent.com/symentis/Palau/master/Resources/palau-logo.png)

![Build Status](https://img.shields.io/badge/build-passing-4BC51D.svg?style=flat)
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
![Platform](https://img.shields.io/badge/platform-ios%20%7C%20tvos%20%7C%20watchos-9b9b9b.svg?style=flat)

#Palau: NSUserDefaults with Wings!

## Features

- [x] Easily store your Custom Types in NSUSerDefaults
- [x] Most Standard Types Out-of-the-box
- [x] Per-property based Chainable Rules
- [x] Supports NSCoding and RawRepresentable
- [x] 300% Type Safe :P
- [x] 100% Unit Test Coverage
- [x] Swift 3 features coming!

## Already Included Types
### Swift
- [x] Bool
- [x] Int
- [x] UInt
- [x] Float
- [x] Double
- [x] String
- [x] Array
- [x] Dictionary

### Foundation
- [x] NSNumber
- [x] NSString
- [x] NSArray
- [x] NSDictionary
- [x] NSDate
- [x] NSData
- [x] NSURL
- [x] NSIndexPath
- [x] UIColor

## Requirements
- Swift 2.2
- iOS 8.0+ / tvOS 9.0+ / watchOS 2.0+
- Xcode 7.3+

## Installation

### Carthage

To integrate Palau into your project using Carthage, add to your `Cartfile`:

```ogdl
github "symentis/Palau" ~> 1.0
```

Run `carthage update` to build the framework and drag the built `Palau.framework` into your Xcode project.
See more instructions on the [Carthage page](https://github.com/Carthage/Carthage).


## Usage
Import Palau

```swift
import Palau
```

Once you import the framework you can setup PalauDefaults like:

```swift
extension PalauDefaults {
  public static var name: PalauDefaultsEntry<String> {
    /// backingName is the key used in NSUserDefaults
    get { return value("backingName") }
    set { }
  }
}
```

### Set
By Default a Value will always be optional. 

If you want to set a value you call:

```swift
PalauDefaults.name.value = "String"
```
<commit_msg>Changes string value to prevent confusion about value.<commit_after>![Palau: NSUserDefaults with Wings!](https://raw.githubusercontent.com/symentis/Palau/master/Resources/palau-logo.png)

![Build Status](https://img.shields.io/badge/build-passing-4BC51D.svg?style=flat)
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
![Platform](https://img.shields.io/badge/platform-ios%20%7C%20tvos%20%7C%20watchos-9b9b9b.svg?style=flat)

#Palau: NSUserDefaults with Wings!

## Features

- [x] Easily store your Custom Types in NSUSerDefaults
- [x] Most Standard Types Out-of-the-box
- [x] Per-property based Chainable Rules
- [x] Supports NSCoding and RawRepresentable
- [x] 300% Type Safe :P
- [x] 100% Unit Test Coverage
- [x] Swift 3 features coming!

## Already Included Types
### Swift
- [x] Bool
- [x] Int
- [x] UInt
- [x] Float
- [x] Double
- [x] String
- [x] Array
- [x] Dictionary

### Foundation
- [x] NSNumber
- [x] NSString
- [x] NSArray
- [x] NSDictionary
- [x] NSDate
- [x] NSData
- [x] NSURL
- [x] NSIndexPath
- [x] UIColor

## Requirements
- Swift 2.2
- iOS 8.0+ / tvOS 9.0+ / watchOS 2.0+
- Xcode 7.3+

## Installation

### Carthage

To integrate Palau into your project using Carthage, add to your `Cartfile`:

```ogdl
github "symentis/Palau" ~> 1.0
```

Run `carthage update` to build the framework and drag the built `Palau.framework` into your Xcode project.
See more instructions on the [Carthage page](https://github.com/Carthage/Carthage).


## Usage
Import Palau

```swift
import Palau
```

Once you import the framework you can setup PalauDefaults like:

```swift
extension PalauDefaults {
  public static var name: PalauDefaultsEntry<String> {
    /// backingName is the key used in NSUserDefaults
    get { return value("backingName") }
    set { }
  }
}
```

### Set
By Default a Value will always be optional. 

If you want to set a value you call:

```swift
PalauDefaults.name.value = "Iam a great String value!"
```

{'fraction_non_alphanumeric': 0.14357429718875503, 'fraction_numerical': 0.019076305220883535, 'mean_word_length': 4.076433121019108, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 12, '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': '272960', 'n_tokens_mistral': 1541, 'n_tokens_neox': 1430, 'n_words': 409}