Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.
/ Elementary Public archive

A Swift package containing information about elements on the periodic table.

License

Notifications You must be signed in to change notification settings

devmaximilian/Elementary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A Swift package containing information about elements on the periodic table.

Resources

License

Stars

Watchers

Forks

Packages

No packages published