Science
Module to generate science related entries.
chemicalElement
Returns a random periodic table element.
Available since v7.2.0
Returns: ChemicalElement
ts
faker.science.chemicalElement(): ChemicalElement
faker.science.chemicalElement() // => {"symbol":"Tb","name":"Terbium","atomicNumber":65}
faker.science.chemicalElement() // { symbol: 'H', name: 'Hydrogen', atomicNumber: 1 }
faker.science.chemicalElement() // { symbol: 'Xe', name: 'Xenon', atomicNumber: 54 }
faker.science.chemicalElement() // { symbol: 'Ce', name: 'Cerium', atomicNumber: 58 }
unit
Returns a random scientific unit.
Available since v7.2.0
Returns: Unit
ts
faker.science.unit(): Unit
faker.science.unit() // => {"name":"ohm","symbol":"Ω"}
faker.science.unit() // { name: 'meter', symbol: 'm' }
faker.science.unit() // { name: 'second', symbol: 's' }
faker.science.unit() // { name: 'mole', symbol: 'mol' }