phydim
v1.0.0
Published
Physics Dimensions
Downloads
1
Maintainers
Readme
⚙️ Installation
npm i phydim
📖 Usage
▣ Import
// ES6
import phydim from "phydim";
// commonjs
const phydim = require("phydim");
▣ All methods
// • All data
console.log(phydim.all()); // { meter: 'L', kilogram: 'M', ...}
// • Random data
console.log(phydim.random()); // { name: 'weber', dimension: 'ML^2/T^2I^-1' }
// • From id
console.log(phydim.id(4)); // { name: 'kelvin', dimension: 'Θ' }
// • From name
console.log(phydim.name("coulomb")); // { name: 'coulomb', dimension: 'IT' }
// • From dimension
console.log(phydim.dimension("MT^-2I^-1")); // { name: 'tesla', dimension: 'MT^-2I^-1' }