Swiftpack.co -  devmaximilian/Elementary as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
devmaximilian/Elementary
A Swift package containing information about elements on the periodic table.
.package(url: "https://github.com/devmaximilian/Elementary.git", from: "1.0.0")

Elementary

Elementary is a Swift package that provides information about elements in the Periodic Table.

Uses Periodic-Table-JSON by Bowserinator to generate elements.


Installation

Elementary is available through Swift Package Manager. To install it, simply include it in your package dependency list:

dependencies: [
    .package(url: "https://github.com/devmaximilian/Elementary.git", from: "1.0.0"),
]

– alternatively using Xcode via File > Swift Packages > Add Package Dependency...

Usage

Check the atomic mass of Hydrogen 🔬

/// Get Hydrogen's atomic mass
Elements.hydrogen.mass // -> 1.008

Get all liquid phase elements ⚗️

/// Get all liquid phase elements
Elements.allElements.filter { $0.phase == .liquid } // -> [Element, Element, ...]

Planned

  • Combine elements to create compounds.

License

See LICENSE for license details concerning this package. The CC-BY-SA 3.0 license is required by upstream data sources.

GitHub

link
Stars: 1
Last commit: 4 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

v1.0.0
16 weeks ago

Initial release.

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