Skip to content

Commit

Permalink
Release v1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gentooboontoo committed Aug 21, 2023
1 parent 4226c6a commit 1d3a6e7
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 15 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
Unreleased
----------

1.8.0 / 2023-08-21
------------------

### Added

* Add "Joules" alias
* Add some parts-per notation units
* Add metric ton symbol t
* Add electronvolt
* Add arcminute and arcsecond

### Fixed

* Fix wrong quantity name for molar_concentration units

1.7.6 / 2020-12-06
------------------

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ and browsers. It has **no dependencies**.

## Installation

Install with `npm install js-quantities` or download latest release v1.7.6 as:
Install with `npm install js-quantities` or download latest release v1.8.0 as:

* [UMD module](https://raw.github.com/gentooboontoo/js-quantities/v1.7.6/build/quantities.js)
* [ES module](https://raw.github.com/gentooboontoo/js-quantities/v1.7.6/build/quantities.mjs)
* [UMD module](https://raw.github.com/gentooboontoo/js-quantities/v1.8.0/build/quantities.js)
* [ES module](https://raw.github.com/gentooboontoo/js-quantities/v1.8.0/build/quantities.mjs)

## Usage

Expand Down
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.6
1.8.0
15 changes: 10 additions & 5 deletions build/quantities.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ SOFTWARE.
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Qty = factory());
}(this, (function () { 'use strict';
})(this, (function () { 'use strict';

/**
* Tests if a value is a string
Expand Down Expand Up @@ -383,13 +383,14 @@ SOFTWARE.
"<oersted>" : [["Oe","oersted","oersteds"], 250.0 / Math.PI, "magnetism", ["<ampere>"], ["<meter>"]],

/* energy */
"<joule>" : [["J","joule","Joule","joules"], 1.0, "energy", ["<meter>","<meter>","<kilogram>"], ["<second>","<second>"]],
"<joule>" : [["J","joule","Joule","joules","Joules"], 1.0, "energy", ["<meter>","<meter>","<kilogram>"], ["<second>","<second>"]],
"<erg>" : [["erg","ergs"], 1e-7, "energy", ["<meter>","<meter>","<kilogram>"], ["<second>","<second>"]],
"<btu>" : [["BTU","btu","BTUs"], 1055.056, "energy", ["<meter>","<meter>","<kilogram>"], ["<second>","<second>"]],
"<calorie>" : [["cal","calorie","calories"], 4.18400, "energy",["<meter>","<meter>","<kilogram>"], ["<second>","<second>"]],
"<Calorie>" : [["Cal","Calorie","Calories"], 4184.00, "energy",["<meter>","<meter>","<kilogram>"], ["<second>","<second>"]],
"<therm-US>" : [["th","therm","therms","Therm","therm-US"], 105480400, "energy",["<meter>","<meter>","<kilogram>"], ["<second>","<second>"]],
"<Wh>" : [["Wh"], 3600, "energy",["<meter>","<meter>","<kilogram>"], ["<second>","<second>"]],
"<electronvolt>" : [["eV", "electronvolt", "electronvolts"], 1.602176634E-19, "energy", ["<meter>","<meter>","<kilogram>"], ["<second>","<second>"]],

/* force */
"<newton>" : [["N","Newton","newton"], 1.0, "force", ["<kilogram>","<meter>"], ["<second>","<second>"]],
Expand All @@ -402,6 +403,8 @@ SOFTWARE.
/* angle */
"<radian>" :[["rad","radian","radians"], 1.0, "angle", ["<radian>"]],
"<degree>" :[["deg","degree","degrees"], Math.PI / 180.0, "angle", ["<radian>"]],
"<arcminute>" :[["arcmin","arcminute","arcminutes"], Math.PI / 10800.0, "angle", ["<radian>"]],
"<arcsecond>" :[["arcsec","arcsecond","arcseconds"], Math.PI / 648000.0, "angle", ["<radian>"]],
"<gradian>" :[["gon","grad","gradian","grads"], Math.PI / 200.0, "angle", ["<radian>"]],
"<steradian>" : [["sr","steradian","steradians"], 1.0, "solid_angle", ["<steradian>"]],

Expand Down Expand Up @@ -460,7 +463,9 @@ SOFTWARE.
"<dozen>" : [["doz","dz","dozen"],12.0,"prefix_only", ["<each>"]],
"<percent>": [["%","percent"], 0.01, "prefix_only", ["<1>"]],
"<ppm>" : [["ppm"],1e-6, "prefix_only", ["<1>"]],
"<ppt>" : [["ppt"],1e-9, "prefix_only", ["<1>"]],
"<ppb>" : [["ppb"],1e-9, "prefix_only", ["<1>"]],
"<ppt>" : [["ppt"],1e-12, "prefix_only", ["<1>"]],
"<ppq>" : [["ppq"],1e-15, "prefix_only", ["<1>"]],
"<gross>" : [["gr","gross"],144.0, "prefix_only", ["<dozen>","<dozen>"]],
"<decibel>" : [["dB","decibel","decibels"], 1.0, "logarithmic", ["<decibel>"]]
};
Expand Down Expand Up @@ -2007,8 +2012,8 @@ SOFTWARE.
});
}

Qty.version = "1.7.6";
Qty.version = "1.8.0";

return Qty;

})));
}));
13 changes: 9 additions & 4 deletions build/quantities.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,14 @@ var UNITS = {
"<oersted>" : [["Oe","oersted","oersteds"], 250.0 / Math.PI, "magnetism", ["<ampere>"], ["<meter>"]],

/* energy */
"<joule>" : [["J","joule","Joule","joules"], 1.0, "energy", ["<meter>","<meter>","<kilogram>"], ["<second>","<second>"]],
"<joule>" : [["J","joule","Joule","joules","Joules"], 1.0, "energy", ["<meter>","<meter>","<kilogram>"], ["<second>","<second>"]],
"<erg>" : [["erg","ergs"], 1e-7, "energy", ["<meter>","<meter>","<kilogram>"], ["<second>","<second>"]],
"<btu>" : [["BTU","btu","BTUs"], 1055.056, "energy", ["<meter>","<meter>","<kilogram>"], ["<second>","<second>"]],
"<calorie>" : [["cal","calorie","calories"], 4.18400, "energy",["<meter>","<meter>","<kilogram>"], ["<second>","<second>"]],
"<Calorie>" : [["Cal","Calorie","Calories"], 4184.00, "energy",["<meter>","<meter>","<kilogram>"], ["<second>","<second>"]],
"<therm-US>" : [["th","therm","therms","Therm","therm-US"], 105480400, "energy",["<meter>","<meter>","<kilogram>"], ["<second>","<second>"]],
"<Wh>" : [["Wh"], 3600, "energy",["<meter>","<meter>","<kilogram>"], ["<second>","<second>"]],
"<electronvolt>" : [["eV", "electronvolt", "electronvolts"], 1.602176634E-19, "energy", ["<meter>","<meter>","<kilogram>"], ["<second>","<second>"]],

/* force */
"<newton>" : [["N","Newton","newton"], 1.0, "force", ["<kilogram>","<meter>"], ["<second>","<second>"]],
Expand All @@ -396,6 +397,8 @@ var UNITS = {
/* angle */
"<radian>" :[["rad","radian","radians"], 1.0, "angle", ["<radian>"]],
"<degree>" :[["deg","degree","degrees"], Math.PI / 180.0, "angle", ["<radian>"]],
"<arcminute>" :[["arcmin","arcminute","arcminutes"], Math.PI / 10800.0, "angle", ["<radian>"]],
"<arcsecond>" :[["arcsec","arcsecond","arcseconds"], Math.PI / 648000.0, "angle", ["<radian>"]],
"<gradian>" :[["gon","grad","gradian","grads"], Math.PI / 200.0, "angle", ["<radian>"]],
"<steradian>" : [["sr","steradian","steradians"], 1.0, "solid_angle", ["<steradian>"]],

Expand Down Expand Up @@ -454,7 +457,9 @@ var UNITS = {
"<dozen>" : [["doz","dz","dozen"],12.0,"prefix_only", ["<each>"]],
"<percent>": [["%","percent"], 0.01, "prefix_only", ["<1>"]],
"<ppm>" : [["ppm"],1e-6, "prefix_only", ["<1>"]],
"<ppt>" : [["ppt"],1e-9, "prefix_only", ["<1>"]],
"<ppb>" : [["ppb"],1e-9, "prefix_only", ["<1>"]],
"<ppt>" : [["ppt"],1e-12, "prefix_only", ["<1>"]],
"<ppq>" : [["ppq"],1e-15, "prefix_only", ["<1>"]],
"<gross>" : [["gr","gross"],144.0, "prefix_only", ["<dozen>","<dozen>"]],
"<decibel>" : [["dB","decibel","decibels"], 1.0, "logarithmic", ["<decibel>"]]
};
Expand Down Expand Up @@ -2001,6 +2006,6 @@ function simplify(units) {
});
}

Qty.version = "1.7.6";
Qty.version = "1.8.0";

export default Qty;
export { Qty as default };
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"readmeFilename": "README.md",
"description": "JavaScript library for quantity calculation and unit conversion",
"version": "1.7.6",
"version": "1.8.0",
"homepage": "http://gentooboontoo.github.io/js-quantities/",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/quantities.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ import "./quantities/predicates.js";
import "./quantities/conversion.js";
import "./quantities/format.js";

Qty.version = "1.7.6";
Qty.version = "1.8.0";

export default Qty;

0 comments on commit 1d3a6e7

Please sign in to comment.