OTCore

Useful extensions on Swift standard library types.

MIT License

Stars
6
Committers
1

Bot releases are visible (Hide)

OTCore - 1.5.3 Latest Release

Published by orchetect 6 months ago

  • Collection: Added .replace(elementsIn:with:) methods
  • Collection: Added .replacing(elementsIn:with:) methods
  • String: Added sanitizePathComponent(for:replacement:) method
  • String: Added sanitizingPathComponent(for:replacement:) method
  • URL: Added sanitizeLastPathComponent(for:replacement:) method
  • URL: Addesd sanitizingLastPathComponent(for:replacement:) method
OTCore - 1.5.2

Published by orchetect 6 months ago

  • Added new Time abstraction for formatting time strings
  • NSImage: Added write(to:options:type:jpegCompressionFactor:) method
OTCore - 1.5.1

Published by orchetect 10 months ago

XML

  • XMLElement: Added addChildren<S: Sequence<XMLNode>>(_:) method
  • XMLElement: Added removeAllChildren() method
  • XMLElement: Added removeChildren(where:) method
OTCore - 1.5.0

Published by orchetect 10 months ago

XML

  • Refactors and API changes for XMLNode extensions
  • XMLNode: Added parentElement property
  • XMLNode: Added childElements property
  • XMLNode: Added firstChildElement(named:) method
  • XMLNode Sequence: Added first(whereNodeNamed:) method
  • XMLNode Sequence: Added first(whereElementNamed:) method
  • XMLElement Sequence: Added first(withAttribute:) method
  • XMLElement Sequence: Added first(whereAnyAttribute:) method
  • XMLElement Sequence: Added first(whereAttribute:hasValue:) method
  • XMLElement Sequence: Added filter(withAttribute:) method
  • XMLElement: Added firstChildElement(withAttribute:) method
  • XMLElement: Added get/set attribute methods for Bool, Int and URL

Swift Collections

  • Added ZeroIndexedCollection with zeroIndexed property on Sequence
  • Added ZeroIndexedMutableCollection with zeroIndexed property on Sequence
  • Added ZeroIndexedRangeReplaceableCollection with zeroIndexed property on Sequence
  • Added LazyFilteredCompactMapSequence typealias
  • ClosedRange contains(Range): Relaxed associated requirements
  • Added Set operators + and +=
  • Sequence: Added mapDictionary(_:) method
  • Sequence: Added compactMapDictionary(_:) method

Swift Concurrency

  • Added withOrderedTaskGroup(sequence:priority:) { element in } global method
OTCore - 1.4.16

Published by orchetect 11 months ago

  • String RegEx methods: Fixed bug where matches and capture groups were sometimes incorrect lengths if the source string contained UTF16 composed characters
OTCore - 1.4.15

Published by orchetect 11 months ago

  • Fixed potential category method collision
OTCore - 1.4.14

Published by orchetect 11 months ago

  • CGFloat: Added integralDigitPlaces and fractionDigitPlaces properties
  • Decimal: Added integralDigitPlaces and fractionDigitPlaces properties
  • Double: Added integralDigitPlaces and fractionDigitPlaces properties
OTCore - 1.4.13

Published by orchetect about 1 year ago

  • @UserDefaultsStorage: Added ability to use any Codable type
OTCore - 1.4.12

Published by orchetect about 1 year ago

  • URL: Added appendingToLastPathComponentBeforeExtension(_:)
OTCore - 1.4.11

Published by orchetect over 1 year ago

  • CGRect: Added scale(factor:) method
  • UserDefaultsStorage: Fixed issue where custom URL get/set closures would not work correctly
  • OTCore is visionOS 1.0 compatible
OTCore - 1.4.10

Published by orchetect over 1 year ago

  • PassiveDataReader: Fixed potential overflow crash
OTCore - 1.4.9

Published by orchetect over 1 year ago

New

  • Collection: Added removeDuplicates()
  • Collection: Added removingDuplicates()
  • Collection: Added removingDuplicatesRandomOrdering()
  • Collection: Added duplicateElements()
  • Collection: Added duplicateElementIndices()
  • Collection: Added allElementsAreEqual property
  • Collection: Added elementsEqual(orderInsensitive:)
  • StringProtocol Collection: Added caseInsensitiveRemovingDuplicates()
  • StringProtocol Collection: Added localizedRemovingDuplicates()
  • StringProtocol Collection: Added localizedCaseInsensitiveRemovingDuplicates()
  • StringProtocol Collection: Added localizedStandardRemovingDuplicates()
  • Added unit tests for all of the above

Fixes

  • Collection: split(every:backwards:) is more resilient with subsequence length of 0 or less
OTCore - 1.4.8

Published by orchetect almost 2 years ago

  • RangeExpression: Fixed getAbsoluteBounds() returning incorrect bounds for some range types
OTCore - 1.4.7

Published by orchetect almost 2 years ago

  • @UserDefaultsStorage: Added support for URL
  • @UserDefaultsStorage: Added support for NS values
OTCore - 1.4.6

Published by orchetect almost 2 years ago

  • URL: Added relative(to:) and mutatingLastPathComponent { }
  • Renamed @UserDefaultsBacked to @UserDefaultsStorage
  • @UserDefaultsStorage: Added init with get and set transformation closures
  • @UserDefaultsStorage: Added computed-only init without default
OTCore - 1.4.5

Published by orchetect about 2 years ago

  • OSLogger: Fixed issue where debug level log messages were being logged in non-DEBUG builds (#40)
OTCore - 1.4.4

Published by orchetect about 2 years ago

  • Added new IPAddress IPv4/IPv6 validation struct
  • RegEx methods now properly handle any StringProtocol base
  • Minor docs updates
OTCore - 1.4.3

Published by orchetect about 2 years ago

  • Added PassiveDataReader struct with .withDataReader { } instance method on DataProtocol
  • DataReader: internal refactor
  • Minor fixes and reliability improvements
OTCore - 1.4.2

Published by orchetect about 2 years ago

  • Collection: Added shortest() and shortestIndex()
  • 


Collection: Added longest() and longestIndex()
OTCore - 1.4.1

Published by orchetect over 2 years ago

  • Added URL path manipulation methods