__ alternatives and similar libraries
Based on the "Utility" category.
Alternatively, view __ alternatives based on common mentions on social networks and blogs.
-
SwifterSwift
A handy collection of more than 500 native Swift extensions to boost your productivity. -
R.swift
Strong typed, autocompleted resources like images, fonts and segues in Swift projects -
SwiftGen
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs! -
SwiftGen-Storyboard
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs! -
swift-protobuf
Plugin and runtime library for using protobuf with Swift -
Dollar
A functional tool-belt for Swift Language similar to Lo-Dash or Underscore.js in Javascript -
EZSwiftExtensions
:smirk: How Swift standard types and classes were supposed to work. -
DifferenceKit
💻 A fast and flexible O(n) difference algorithm framework for Swift collection. -
Device
Light weight tool for detecting the current device and screen size written in swift. -
SwiftLinkPreview
It makes a preview from an URL, grabbing all the information such as title, relevant texts and images. -
WhatsNew
Showcase new features after an app update similar to Pages, Numbers and Keynote. -
Codextended
Extensions giving Swift's Codable API type inference super powers 🦸♂️🦹♀️ -
Playbook
📘A library for isolated developing UI components and automatically taking snapshots of them. -
SwiftyJSONAccelerator
macOS app to generate Swift 5 code for models from JSON (with Codeable) -
ReadabilityKit
Preview extractor for news, articles and full-texts in Swift -
Compass
:earth_africa: Compass helps you setup a central navigation system for your application -
ObjectiveKit
Swift-friendly API for a set of powerful Objective C runtime functions. -
BetterSafariView
A better way to present a SFSafariViewController or start a ASWebAuthenticationSession in SwiftUI. -
Pythonic.swift
Pythonic tool-belt for Swift – a Swift implementation of selected parts of Python standard library. -
SwiftPlantUML
A command-line tool and Swift Package for generating class diagrams powered by PlantUML
WorkOS - The modern identity platform for B2B SaaS
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of __ or a related project?
Popular Comparisons
README
__.swift
Now, _.swift is version 0.2.0! With the chain of methods, _.swift became more flexible and extensible.
Documentation: http://lotz84.github.io/__.swift/v0.1/ (Updates coming soon..)
_.swift aims to be an utility belt for a new programming language by Apple Inc., Swift. And we decided _.swift to be a clone of Underscore.js, which is an utility belt for JavaScript.
__.swift is a type-safe library because it uses type inference and generics. Therefore, you can write a program without most of the downcasting such as "as" or "as?".
Philosophy
- Type safe
- Flexible and Extensible
- Do not reinvent the wheel
- A port of Underscore.js to Swift
Installation
If you use __
from swift file, copy __.swift
folder into your project. That's all.
Examples
__.map([11,22,33]) { x in x * x }
// [121, 484, 1089]
__.reduce(["H", "e", "l", "l", "o", " ", "S", "w", "i", "f", "t", " ", "!", "!"], "", + )
// Hello Swift !!
func isPrime(n: Int) -> Bool {
if n < 2 { return false }
let max = Int(sqrt(Double(n)))
for i in 2...max {
if n % i == 0 { return false }
}
return true
}
__.find([1,33,173,46], isPrime)
// 173
__.filter(Array(2..100) , isPrime)
// [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
let data = [
["plan": "walking", "time": "8 a.m."],
["plan": "work", "time": "10 a.m."],
["plan": "lunch", "time": "12 a.m."]
]
__.pluck(data, "plan")
// [walking, work, lunch]
let data2: Array<Dictionary<String, String>> = [
["species": "spider", "legs": "8"],
["species": "ant", "legs": "6"],
["species": "cat", "legs": "4"]
]
// Chain Example
__.chain(data).pluck("legs")?.map({(s:String) -> Int in s.toInt()! })?.sortBy(__.identity)?.value()
// [4, 6, 8]
Alternatives
- pNre/ExSwift - JavaScript (Lo-Dash, Underscore) & Ruby inspired set of Swift extensions for standard types and classes.
- RuiAAPeres/Swift-Sugar - Swift's Sugar. Heavily inspired on Objc Sugar
- ankurp/Dollar.swift - A functional tool-belt for Swift Language similar to Lo-Dash or Underscore in Javascript
- maxpow4h/swiftz - Functional programming in Swift
Contribution
Feel free to send a PR or create a new issue.
License
MIT Licence
*Note that all licence references and agreements mentioned in the __ README section above
are relevant to that project's source code only.