1.0.0 • Published 12 months ago

phydim v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

⚙️ 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' }

Support me on PatreonCheck out my socials