August 18, 2022

Blog @ Munaf Sheikh

Latest news from tech-feeds around the world.

web-units-conversify – npm


web-units-conversify

1.2.0 • Public • Published





License: MIT

Javascript library for converting pixels, viewports and REM units!

Goal


This package is mainly made to convert CSS measurement units from HTML elements from one kind to another.

Install

yarn add web-units-conversify
npm install web-units-conversify

Author

👤 joao alberto cambauva

Show your support

Give a ⭐️ if this project helped you!

How to use the package:


import { pixelsToREM, remToPixels, remToVH, remToVW, vhToREM, vwToREM, pixelsToVH, pixelsToVW, vhToPixels, vwToPixels, } from "web-units-conversify";
console.log(remToPixels(10) + "px"); console.log(pixelsToREM(1024) + "rem"); console.log(remToVH(12) + "vh"); console.log(vwToREM(15) + "em"); // can be EM or REM

//etc...

ENJOY! =)


https://github.com/joaocambauva/web-units-conversify

You Can Contribute Here If You Want To! Cheers!


https://www.npmjs.com/package/web-units-conversify

Keywords

none

Install

npm i web-units-conversify

DownloadsWeekly Downloads

Collaborators

  • joaoalbertocsjunior



Source link