OTCore

Useful extensions on Swift standard library types.

MIT License

Stars
6
Committers
1

Bot releases are hidden (Show)

OTCore - 1.4.0

Published by orchetect over 2 years ago

Updates

  • Reduced precedence of all methods and properties to proactively avoid potential global namespace collisions
  • Progress: added parent and children properties
  • Added XCTestUtils testing dependency and moved testing helpers there
  • Formatting and general cleanup

API Changes

  • String: Renamed .parens to .parenthesized
  • Removed ifTrue(), ifFalse(), ifContained(), ifNotContained() category methods
OTCore - 1.3.0

Published by orchetect over 2 years ago

  • XCTestCase: Added wait(for condition: timeout: polling:) method
  • Added sleep(TimeInterval) method
  • Added DispatchTimeInterval.microseconds property
  • Various bugfixes, fixed build on Xcode 12.4 and various platforms, made watchOS unit testing more resilient
  • Unit tests updated
  • @Atomic is moved to new OTAtomics repo, renamed to @OTAtomicsThreadSafe
  • Moved new Operation and OperationQueue subclasses to new OTOperations repo
OTCore - 1.2.1

Published by orchetect over 2 years ago

  • Improvements and resiliency added to Operation and OperationQueue subclasses
OTCore - 1.2.0

Published by orchetect over 2 years ago

  • CharacterSet: added init(_: [Character])
  • Added @UserDefaultsBacked property wrapper
  • Added @Clamped property wrapper
  • Added @Validate property wrapper
  • @Atomic now includes set { } to give the compiler more flexibility
  • DispatchGroup
    • Added .sync { } static method
    • Added .sync(asyncOn:) { } static method
    • Added .sync(asyncOn:timeout:) { } static method
    • Added variants to above methods that can return a value from the closure
  • Added Operation subclasses
    • BasicOperation, BasicAsyncOperation
    • ClosureOperation, AsyncClosureOperation
    • CancellableClosureOperation, CancellableAsyncClosureOperation
    • AtomicBlockOperation
  • Added OperationQueue subclasses
    • BasicOperationQueue
    • AtomicOperationQueue
  • Moved split(every:backwards:) from String to Collection
  • Collection: added indices(splitEvery:)
  • Range: added split(every:)
  • ClosedRange: added split(every:)
  • File organization
  • Inline docs updated
  • Updated unit tests, better resilience for watchOS testing
OTCore - 1.1.29

Published by orchetect almost 3 years ago

  • Dictionary: Added .compactMapDictionary method
OTCore - 1.1.28

Published by orchetect almost 3 years ago

  • Added .contains(RangeExpression) extension method on all relevant RangeExpression base types
OTCore - 1.1.27

Published by orchetect almost 3 years ago

  • Added CGPoint.nsPoint and NSPoint.cgPoint methods
  • CGRect: Added .center, .grow(by:), .shrink(by:)
  • NSEvent: Added .location(in: NSView)
  • NSScreen: Added static screenWithMouseCursor and instance method containsMouseCursor
  • NSFont: Added .cgFont
OTCore - 1.1.26

Published by orchetect almost 3 years ago

  • Improved OSLogger: flexible token templates, closure-based init
OTCore - 1.1.25

Published by orchetect almost 3 years ago

  • Collection: Added .remove(safePositionAt:) method
  • Collection & NSArray: Improved [safe:]/[safePosition:] setters by allowing inline mutability
OTCore - 1.1.24

Published by orchetect almost 3 years ago

  • Refactored Log static enum as new Logger class
OTCore - 1.1.23

Published by orchetect almost 3 years ago

  • Refactored [position:] subscripts on StringProtocol to work on any Collection type
  • Collection: Improved [safe: Int] subscript, added [safePosition: Int] subscript
  • Collection: Added [safe: ClosedRange] and [safePosition: ClosedRange] subscripts
  • Collection: Added [safe: Range] and [safePosition: Range] subscripts
  • Collection: Added [safe: PartialRangeFrom] and [safePosition: PartialRangeFrom] subscripts
  • Collection: Added [safe: PartialRangeThrough] and [safePosition: PartialRangeThrough] subscripts
  • Collection: Added [safe: PartialRangeUpTo] and [safePosition: PartialRangeUpTo] subscripts
  • Fixed Xcode 12.4 build
OTCore - 1.1.22

Published by orchetect almost 3 years ago

  • CharacterSet: Added .consonants, .vowels, .lowercaseVowels, .uppercaseVowels
  • CharacterSet: Added operators +, +=, -, -=
  • StringProtocol: Improved .only() & .removing() to allow multiple CharacterSets
  • StringProtocol: Added .firstIndex(of: StringProtocol)
  • StringProtocol: Added .isASCII,
  • StringProtocol: Added .isOnly(characterSet:), .contains(any characterSet:)
  • StringProtocol: Added .startIndex(offsetBy:) and .endIndex(offsetBy:)
  • StringProtocol: Added [position:] index offset subscripts for Int and all Range types
  • String: Added .isValidEmailAddress
  • String: Improved extensions to accept StringProtocol parameters and return Substring where possible
  • Respelled all uint* methods as uInt*
OTCore - 1.1.21

Published by orchetect almost 3 years ago

  • Dictionary: Added mapKeys and mapDictionary methods
OTCore - 1.1.20

Published by orchetect almost 3 years ago

  • Removed unused .if extension methods
OTCore - 1.1.19

Published by orchetect almost 3 years ago

  • Added .grouping(by:) method to Sequence
  • Fixed ARM build for unit tests
OTCore - 1.1.18

Published by orchetect almost 3 years ago

  • Added DataReader
OTCore - 1.1.17

Published by orchetect about 3 years ago

  • Added @Atomic property wrapper, also safe for collection types
OTCore - 1.1.16

Published by orchetect about 3 years ago

  • Added .string(rounding:decimalPlaces:) method to FloatingPoint
  • Improved some floating-point methods
  • Added ! prefix operator to NSControl.StateValue
  • Added .stateValue: NSControl.StateValue to Bool
  • Globals
    • Renamed bundleMainBundle
    • Renamed systemSystem
    • Renamed Bundle.mainInfoDictionary(key:)Bundle.infoDictionaryString(key:)
  • UserDefaults: Added .exists(key:) method
  • Removed stale pointer methods
  • Updated unit tests and added missing tests
OTCore - 1.1.15

Published by orchetect about 3 years ago

  • Changed capture semantics
OTCore - 1.1.14

Published by orchetect about 3 years ago

Fixed watchOS build