Skip to content

Generators

science

Chemical elements and SI units.

var faker = Faker(seed: 1337, locale: DecoyLocaleEN.locale)
faker.science.chemicalElement()
Method Example output
chemicalElement() ["atomicNumber": "48", "name": "Cadmium", "symbol": "Cd"]
["atomicNumber": "103", "name": "Lawrencium", "symbol": "Lr"]
["atomicNumber": "75", "name": "Rhenium", "symbol": "Re"]
unit() ["name": "miles per Imp. gallon", "symbol": "m/gUK"]
["name": "dots per inch", "symbol": "dpi"]
["name": "metric cups", "symbol": "mc"]

Examples are real output from three different seeds, captured when this page was built, using each method’s default arguments. Where a signature shows parameters, pass your own to change the size, gender, length or format.