Swiftpack.co - miquido/MQ-iOS as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by miquido.
miquido/MQ-iOS 0.4.0
Swift code essentials for better quality codebases. The project was made by Miquido: https://www.miquido.com/
⭐️ 2
🕓 5 weeks ago
iOS macOS watchOS tvOS macCatalyst
.package(url: "https://github.com/miquido/MQ-iOS.git", from: "0.4.0")

MQ

Platforms Swift Package Manager compatible SwiftVersion

MQ is:

  • a Swift package providing extensions for the language
  • a foundation for writing code in a certain style

MQ is not:

  • a place to put commonly used fragments of code
  • a place to implement domain or platform specific solutions

MQ package has no dependencies besides Swift itself and its standard library. However it can conditionally provide extensions and functionalities on platforms where some platform specific (iOS/macOS etc.) libraries are available.

Preferred code style is described as a part of this repository.

What is inside?

MQ is a library providing Swift language extensions. It includes:

  • SourceCodeLocation, SourceCodeMeta, SourceCodeContext - tools for gathering metadata from the source code.
  • TheError - base interface for errors and error handling with a bunch of common error implementations.
  • Lock - abstraction over locking
  • void, always, noop - placeholders for various of contexts.
  • runtimeAssert, runtimeAssertionFailure - replacement for Swift assertions that can be manually controlled i.e. to allow unit test coverage for paths using assertions.

License

Copyright 2021 Miquido

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

GitHub

link
Stars: 2
Last commit: 3 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Localization and Locking
6 weeks ago

Rework DisplayableString to be Hashable, Localizable and create custom StringInterpolation for it. Add os_unfair_lock implementation for Lock. Add atomic_flag based (spin lock) implementation of CriticalSection type for memory access synchronization . Remove NSLock implementation for Lock. Remove Lock.acquireBefore method. Add identity function. Add Task waiting methods.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics