js-quantities icon indicating copy to clipboard operation
js-quantities copied to clipboard

JavaScript library for quantity calculation and unit conversion

Results 59 js-quantities issues
Sort by recently updated
recently updated
newest added

getSystems() It would be useful to tag/group the unit names by their SI, Imperial or other system and allow conversion toSystem('imperial') getSystems() ... ['si', 'imperial', ...] Qty.getKinds('si') or Qty.getUnits('length', 'imperial')...

It would be wonderful if the degree symbol was recognized as part of a temperature unit. Then, there would be no need to strip out the ° symbol when performing...

I noticed that converting some compound units from SI/US produces wrong results. Here is an example with mass per area: var qty = new Qty(657.5, 'kg/m^2'); qty.to('lb/sqft'); This results in...

Gauge pressure units are commonly used in engineering calculation, like "bar-g", "MPa-g". Is it possible to add support for these gauge pressure units?

I created a PR #98 that adds a unit for pH. It's not a standard SI unit, but it's very commonly used instead of using the hydrogen ion concentration so...

i.e. `Qty('2. mg')` will generate a `QtyError: Unit not recognized`. This was unexpected to me because `parseFloat` will accept a value with a trailing dot.

Something parsing fails and a QtyError is thrown. The error messages give a vague idea of what went wrong, but it would be great if they could include the input...

Hi, I need to create two combined units: '**% / g/m²**' and '**°C / g/m²**'. When I used Qty('% / g / m2') or Qty('% / g m-2') or Qty('%...

To persist a `Qty` object to a JSON store or pass to a JSON REST service it looks like you can rely on `Qty#toString()` roundtripping. However, it might be useful...

enhancement

Hi, I was about to use Qty("1Kg") but got an "unit not recognized" error. All other prefixes work both with upper and lower case letter (ex: 1Cm == 1cm). I've...