OTCore

Useful extensions on Swift standard library types.

MIT License

Stars
6
Committers
1

Bot releases are hidden (Show)

OTCore - 1.1.13

Published by orchetect about 3 years ago

  • Added Decimal.truncatingRemainder(dividingBy:)
OTCore - 1.1.12

Published by orchetect about 3 years ago

  • Decimal: Added .quotientAndRemainder() method
  • Decimal: Added .rounded() and .truncated() methods
OTCore - 1.1.11

Published by orchetect about 3 years ago

  • Removed XCTWait
OTCore - 1.1.10

Published by orchetect about 3 years ago

  • Fixed tvOS build
  • Updated GitHub CI
OTCore - 1.1.9

Published by orchetect about 3 years ago

  • Removed OTCoreTesting / OTCoreTestingXCTest modules (but kept XCTWait in OTCore).
  • Updated README
  • Formatting/cleanup
OTCore - 1.1.8

Published by orchetect over 3 years ago

  • Added ArraySlice .array property
OTCore - 1.1.7

Published by orchetect over 3 years ago

  • Resolved potential os_log memory leaks in Log
OTCore - 1.1.6

Published by orchetect over 3 years ago

  • Added CGPoint.angle(to: CGPoint)
  • Added CGPoint.cardinalAngle(to: CGPoint)
  • Added CGPoint.distance(to: CGPoint)
  • Added CGPoint .xInverted, .yInverted, .xyInverted
  • Added BinaryFloatingPoint .degreesToRadians / .radiansToDegrees
  • Added FloatingPoint.wrapped(around:)
  • Added missing CGFloat and BinaryFloatingPoint conversion methods
  • Made String.regex* methods more flexible
    • CODE-BREAKING NOTE: regexMatches(captureGroupsFromPattern:::) now returns capture 0 instead of omitting it.
OTCore - 1.1.5

Published by orchetect over 3 years ago

  • Renamed .transform{} -> T to .transformed{} -> T
  • Added .transform{} -> Self mutating func
  • Added unit tests for above
OTCore - 1.1.4

Published by orchetect over 3 years ago

  • Fixed rare crashes when Data had improper memory alignment in the following Data extension methods:
    • .toInt16(from:)
    • .toUInt16(from:)
    • .toInt32(from:)
    • .toUInt32(from:)
    • .toInt64(from:)
    • .toUInt64(from:)
    • .toFloat32(from:)
    • .toDouble(from:)
  • Aggressive memory alignment unit test has been added to prevent possible regression in future
OTCore - 1.1.3

Published by orchetect over 3 years ago

  • Added URL.trashOrDelete() and unit test
OTCore - 1.1.2

Published by orchetect over 3 years ago

Added OTCore-Testing and OTCore-Testing-XCTest modules:

  • assert, assertionFailure, precondition, preconditionFailure, and fatalError capturing for XCTest test cases
  • XCTWait(sec:) method for synchronous wait in XCTest test cases, non- runloop blocking
OTCore - 1.1.1

Published by orchetect over 3 years ago

  • Added: Comparable .isContained(in:)
  • Added: Comparable .ifContained(in:then:), .ifNotContained(in:then:)
  • Added: BinaryInteger .intExactly thru .uint64Exactly, .doubleExactly, .floatExactly
  • Added: Bool .ifTrue(T, else:T)→T, .ifTrue(T)→T?, ifFalse(T)→T?
  • Added: Equatable .transform { }, .if(:then:), .if(:then:else:)
  • Log: made properties static
  • Log: Added OSLogType.x.log(...) convenience method
  • Minor bugfixes, typo fixes, inline documentation tweaks
OTCore - 1.1.0

Published by orchetect almost 4 years ago

Major library refactor and overhaul:

  • Reduced imports and broadened protocol adoptions so methods are now usable on more types
  • Performance improvements
  • Bug fixes
  • Cleaned up formatting
  • Cleaned up unit tests
  • Proper README.md added
OTCore - 1.0.6

Published by orchetect almost 4 years ago

  • Added Log.swift (os_log wrapper)
  • Added UserDefaults.swift (Optional getters for Int, Double, Float, Bool)
  • Added Globals.swift (Global bundle and system info)
  • All unit tests passing on macOS, iOS, tvOS.
OTCore - 1.0.5

Published by orchetect almost 4 years ago

Added TimeInterval and timespec reciprocal constructors

OTCore - 1.0.4

Published by orchetect almost 4 years ago

  • Added timespec extensions
  • Added clock_gettime_monotonic_raw() method
  • Minor syntax & documentation updates
OTCore - 1.0.3

Published by orchetect about 4 years ago

Fix Float80 not compiling on watchOS

OTCore - 1.0.2

Published by orchetect about 4 years ago

Fixed multiplatform build and tests.

OTCore - 1.0.1

Published by orchetect about 4 years ago

  • Minor fixes
  • Removed Float80 from ARM64 targets