diff --git a/CHANGELOG.md b/CHANGELOG.md index 3befe69..ec04411 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 ------------------ diff --git a/README.md b/README.md index 2db1ea5..22d170b 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/RELEASE b/RELEASE index de28578..27f9cd3 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -1.7.6 +1.8.0 diff --git a/build/quantities.js b/build/quantities.js index 77d61a0..b7ae4ee 100644 --- a/build/quantities.js +++ b/build/quantities.js @@ -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 @@ -383,13 +383,14 @@ SOFTWARE. "" : [["Oe","oersted","oersteds"], 250.0 / Math.PI, "magnetism", [""], [""]], /* energy */ - "" : [["J","joule","Joule","joules"], 1.0, "energy", ["","",""], ["",""]], + "" : [["J","joule","Joule","joules","Joules"], 1.0, "energy", ["","",""], ["",""]], "" : [["erg","ergs"], 1e-7, "energy", ["","",""], ["",""]], "" : [["BTU","btu","BTUs"], 1055.056, "energy", ["","",""], ["",""]], "" : [["cal","calorie","calories"], 4.18400, "energy",["","",""], ["",""]], "" : [["Cal","Calorie","Calories"], 4184.00, "energy",["","",""], ["",""]], "" : [["th","therm","therms","Therm","therm-US"], 105480400, "energy",["","",""], ["",""]], "" : [["Wh"], 3600, "energy",["","",""], ["",""]], + "" : [["eV", "electronvolt", "electronvolts"], 1.602176634E-19, "energy", ["","",""], ["",""]], /* force */ "" : [["N","Newton","newton"], 1.0, "force", ["",""], ["",""]], @@ -402,6 +403,8 @@ SOFTWARE. /* angle */ "" :[["rad","radian","radians"], 1.0, "angle", [""]], "" :[["deg","degree","degrees"], Math.PI / 180.0, "angle", [""]], + "" :[["arcmin","arcminute","arcminutes"], Math.PI / 10800.0, "angle", [""]], + "" :[["arcsec","arcsecond","arcseconds"], Math.PI / 648000.0, "angle", [""]], "" :[["gon","grad","gradian","grads"], Math.PI / 200.0, "angle", [""]], "" : [["sr","steradian","steradians"], 1.0, "solid_angle", [""]], @@ -460,7 +463,9 @@ SOFTWARE. "" : [["doz","dz","dozen"],12.0,"prefix_only", [""]], "": [["%","percent"], 0.01, "prefix_only", ["<1>"]], "" : [["ppm"],1e-6, "prefix_only", ["<1>"]], - "" : [["ppt"],1e-9, "prefix_only", ["<1>"]], + "" : [["ppb"],1e-9, "prefix_only", ["<1>"]], + "" : [["ppt"],1e-12, "prefix_only", ["<1>"]], + "" : [["ppq"],1e-15, "prefix_only", ["<1>"]], "" : [["gr","gross"],144.0, "prefix_only", ["",""]], "" : [["dB","decibel","decibels"], 1.0, "logarithmic", [""]] }; @@ -2007,8 +2012,8 @@ SOFTWARE. }); } - Qty.version = "1.7.6"; + Qty.version = "1.8.0"; return Qty; -}))); +})); diff --git a/build/quantities.mjs b/build/quantities.mjs index 36c4f4a..958840f 100644 --- a/build/quantities.mjs +++ b/build/quantities.mjs @@ -377,13 +377,14 @@ var UNITS = { "" : [["Oe","oersted","oersteds"], 250.0 / Math.PI, "magnetism", [""], [""]], /* energy */ - "" : [["J","joule","Joule","joules"], 1.0, "energy", ["","",""], ["",""]], + "" : [["J","joule","Joule","joules","Joules"], 1.0, "energy", ["","",""], ["",""]], "" : [["erg","ergs"], 1e-7, "energy", ["","",""], ["",""]], "" : [["BTU","btu","BTUs"], 1055.056, "energy", ["","",""], ["",""]], "" : [["cal","calorie","calories"], 4.18400, "energy",["","",""], ["",""]], "" : [["Cal","Calorie","Calories"], 4184.00, "energy",["","",""], ["",""]], "" : [["th","therm","therms","Therm","therm-US"], 105480400, "energy",["","",""], ["",""]], "" : [["Wh"], 3600, "energy",["","",""], ["",""]], + "" : [["eV", "electronvolt", "electronvolts"], 1.602176634E-19, "energy", ["","",""], ["",""]], /* force */ "" : [["N","Newton","newton"], 1.0, "force", ["",""], ["",""]], @@ -396,6 +397,8 @@ var UNITS = { /* angle */ "" :[["rad","radian","radians"], 1.0, "angle", [""]], "" :[["deg","degree","degrees"], Math.PI / 180.0, "angle", [""]], + "" :[["arcmin","arcminute","arcminutes"], Math.PI / 10800.0, "angle", [""]], + "" :[["arcsec","arcsecond","arcseconds"], Math.PI / 648000.0, "angle", [""]], "" :[["gon","grad","gradian","grads"], Math.PI / 200.0, "angle", [""]], "" : [["sr","steradian","steradians"], 1.0, "solid_angle", [""]], @@ -454,7 +457,9 @@ var UNITS = { "" : [["doz","dz","dozen"],12.0,"prefix_only", [""]], "": [["%","percent"], 0.01, "prefix_only", ["<1>"]], "" : [["ppm"],1e-6, "prefix_only", ["<1>"]], - "" : [["ppt"],1e-9, "prefix_only", ["<1>"]], + "" : [["ppb"],1e-9, "prefix_only", ["<1>"]], + "" : [["ppt"],1e-12, "prefix_only", ["<1>"]], + "" : [["ppq"],1e-15, "prefix_only", ["<1>"]], "" : [["gr","gross"],144.0, "prefix_only", ["",""]], "" : [["dB","decibel","decibels"], 1.0, "logarithmic", [""]] }; @@ -2001,6 +2006,6 @@ function simplify(units) { }); } -Qty.version = "1.7.6"; +Qty.version = "1.8.0"; -export default Qty; +export { Qty as default }; diff --git a/package.json b/package.json index 5802f5e..02f5a74 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/quantities.js b/src/quantities.js index 12e2509..eec095f 100644 --- a/src/quantities.js +++ b/src/quantities.js @@ -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;