New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@benehmke/measurement

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@benehmke/measurement

Javascript Classes for storing, and converting units of measurement

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

Measurement

Javascript Classes for storing, and converting units of measurement

Installation

npm install @benehmke/measurement
import {Length} from 'measurement';

const boxFront = new Length('9 ft');
const boxSide = new Length(4, 'ft');
const boxHeight = new Length({value: 4, unit: 'in'})

Usage

to(units)

const boxFront = new Length('9 ft');
console.log(boxFront.to('in'));
// >> 108 in

valueOf

const distanceA = new Length('9 ft');
const distanceB = new Length('5 m');
console.log(distanceA < distanceB);
// >> true

Units

Length

NameLabel
Millimetermm
Centimetercm
Meterm
Kilometerkm
Inchin
Footft
Yardyd
Milemi

Area

NameLabel
Square Metersqm
Square Footsqft
Tsubotsubo

Development

TODO

  • Add/Subtract Method
  • Length.toArea
  • Custom Unit rename (ex ft2 for sqft)
  • Volume
  • Weight

Build

npm run build

Test

npm run test

Release

npm publish

Keywords

units

FAQs

Package last updated on 21 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts