Latest 1.0
Homepage https://github.com/superpeteblaze/SafeArray
License MIT
Platforms ios 9.0
Authors

[CI Status](https://travis-ci.org/Pete Smith/SafeArray)
Version
License
Platform

SafeArray is a wrapper on a Swift Array which provides thread-safe access to it’s underlying Array elements.

Thread-safe versions Array/Collection methods such as append, map are provided.

Examples

Creating a SafeArray

let safeArray = SafeArray<Int>(withElements: [1,2,3]])

Appending elements

var safeArray = SafeArray<Int>(withElements: [1,2,3]])
safeArray.append(contentsOf: [4,5])

Map

let safeArray = SafeArray<String>(withElements: ["world1","world2"])        
let mappedArray = safeArray.map { "Hello "+$0 }

Filter

let safeArray = SafeArray<Int>(withElements: [1,2,3])
let filteredArray = safeArray.filter { $0 != 1 }

Requirements

iOS 9

Installation

SafeArray is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "SafeArray"

Author

Pete Smith, [email protected]

License

SafeArray is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "SafeArray",
    "version": "1.0",
    "summary": "SafeArray is a wrapper on a Swift Array which provides thread-safe access to the Array elements.",
    "description": "SafeArray is attended to be used in place of a general Swift ArraynIt provides thread-safe access to it's underlying Array collection.nThread-safe versions Array/Collection methods such as append, map are provided.",
    "homepage": "https://github.com/superpeteblaze/SafeArray",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Pete Smith": "[email protected]"
    },
    "source": {
        "git": "https://github.com/superpeteblaze/SafeArray.git",
        "tag": "v1.0"
    },
    "social_media_url": "https://twitter.com/superpeteblaze",
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "SafeArray/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This