phydim

1.0.0 • Public • Published

phydim.js

Physics Dimensions

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

Package Sidebar

Install

npm i phydim

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

9.8 kB

Total Files

5

Last publish

Collaborators

  • axoraxdev