Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jul 19, 2023. It is now read-only.

devmaximilian/Elementary

Open more actions menu

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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.