119 Commits

Author SHA1 Message Date
Harry Sarson
af417d8384
add use strict to the top of a bunch of files 2018-04-27 21:28:28 +01:00
Jos de Jong
04442daf52
Merge branch 'develop' into develop 2018-04-17 20:08:52 +02:00
jos
35dd854d16 Fixed #1082: implemented support for unit plurals decades, centuries, and millennia 2018-04-17 20:02:15 +02:00
Eric Mansfield
2fcec34c9a Fixed year/decade and wrote test for checking in future 2018-04-15 12:59:49 -06:00
jos
21f2d46784 Fixed #1072: Added support for long and short prefixes for the unit bar 2018-04-04 11:35:18 +02:00
jos
b00e0b7460 Fixed #1061: math.unit not accepting input like 1/s 2018-03-17 14:01:29 +01:00
jos
7f6f997fa3 Merge branch 'develop' into v4 2018-02-25 14:00:41 +01:00
jos
3059e1b94f Fixed truncation of some docs when generating markdown (see #1040) 2018-02-21 13:22:08 +01:00
jos
4469f6bd0c Remove support for implicit conversion of null to 0. See #830. 2018-01-23 20:26:38 +01:00
jos
2c1b8f2f05 Fixed #749: Changed rad, deg, and grad to have short prefixes, and introduced radian, degree, and gradian and their plurals having long prefixes 2018-01-23 14:18:26 +01:00
jos
9e0cc3fb61 Refactored x && x.isUnit === true into type.isUnit(x) 2017-08-12 12:07:03 +02:00
jos
26e70a4acd Refactored x.isComplex === true into type.isComplex(x) 2017-08-12 11:32:40 +02:00
Alexander Beyn
bcf781907a Simplify units on "other", since it may have been replaced. 2017-08-03 01:55:54 -07:00
Alexander Beyn
8af981ff03 Simplify units before returning numeric value 2017-07-23 14:02:33 -07:00
jos
96674094d6 Compare numeric types first by value, then by type 2017-06-30 10:02:26 +02:00
Jos de Jong
12a01706e9 Merge pull request #877 from pjhampton/pjhampton/units--fix-erg-def
Fixed erg (energy) definition.
2017-06-18 14:46:48 +02:00
PJ Hampton
332a2d4eb5 Fixed erg (energy) definition.
Removed package.json

update pr.
2017-06-17 23:59:13 +01:00
ericman314
e96cad0370 Corrects round-off errors in splitUnit 2017-06-04 22:18:43 -06:00
jos
64498eddd6 Fixed #861: physical constants not available in the expression parser 2017-05-25 16:13:42 +02:00
jos
29d632f1d9 Fixed creating units with an alias not working within the expression parser 2017-05-12 13:28:13 +02:00
jos
41b0f5138b Expose BASE_DIMENSIONS on Unit 2017-05-08 20:00:43 +02:00
jos
85ac1a0aa4 Some more security measures 2017-05-05 20:53:20 +02:00
ericman314
d24b945cb1 Added Unit.prototype.toSI 2017-03-29 08:46:34 -06:00
Troy Alford
f6bb6faebe Removing extraneous require('utils')
When packaging this library with `rollup.js` - there is a continual complaint about importing a "node built-in" `util`, which stems from this line in `Unit.js`. The line appears extraneous, however - so this PR simply removes it.
2017-01-28 17:10:32 -08:00
jos
b866ca3e48 Released v3.8.0 2016-11-18 19:41:40 +01:00
jos
e6a049abe7 Fixed #749: Units rad, deg, and grad can now have prefixes like millirad 2016-11-18 19:27:50 +01:00
jos
7152142661 Fixed #732: Allow letter-like unicode characters like Ohm \u2126 2016-11-18 19:19:17 +01:00
Eric
feb834b040 Units no longer search for the best prefix if the current prefix results in a value approximately between 0.1 and 1000.
Adjusted unit tests.
2016-11-06 06:59:12 -07:00
Ekin Koc
7dc744f24f Remove unnecessary logging 2016-09-11 02:32:43 +03:00
jos
4ca3c3997e Released v3.4.0 2016-08-07 14:12:34 +02:00
Eric
0044105bd7 Unit tests 2016-08-06 13:04:51 -06:00
Eric
58e3247c27 Added splitUnit function 2016-08-06 12:31:49 -06:00
Eric
b0b607d967 Finished docs 2016-07-27 23:50:49 -06:00
Eric
49378e1891 Finished bug fixes and added tests 2016-07-27 00:15:46 -06:00
Eric
8334e4a6c8 More bug fixing 2016-07-26 23:04:52 -06:00
Eric
37538119aa Working out more bugs 2016-07-26 22:51:43 -06:00
Eric
7c5ff021ed Fixed bug with dimensions array having unknown number of items 2016-07-25 18:03:31 -06:00
Eric
ec8ab2d86d Added base property to createUnit to help user-defined units to be simplified easier 2016-07-19 00:58:46 -06:00
Eric
efaa989cad Update API to accept objects and create multiple units 2016-07-19 00:30:57 -06:00
Eric
6182eb4f35 Fixed small bug when create units with aliases 2016-07-13 19:51:34 -06:00
Eric
b7978dee23 Added Unit.createUnits and createUnits function, and tests. 2016-07-13 00:29:14 -06:00
Eric
a218ea419e Moved duplicate code to separate function 2016-04-23 13:34:15 -06:00
Eric
d2494408ef Unitless units are now converted to numeric values when predictable:false 2016-04-19 15:52:25 -06:00
jos
5acdd961c3 Fixed #631: unit aliases weeks, months, and years where missing 2016-03-31 08:22:28 +02:00
stu blair
7bcae661b2 Add prefixes to moles
* Enables units like 'nanomoles'
2016-03-14 14:24:56 -07:00
Jos de Jong
ebd1c11ee6 Merge pull request #596 from hgupta9/develop
Add kip unit
2016-03-05 10:12:19 +01:00
hgupta9
13231cf90d spaces 2016-03-05 12:31:01 +05:30
hgupta9
f86d3d8a9e add kip unit 2016-03-05 12:28:54 +05:30
jos
15aca5e4d0 Changed casing of the values of config options number and matrix to match the actual name of the classes. 2016-03-04 19:41:54 +01:00
jos
f4b794100e Replaced tabs with spaces 2016-03-03 20:29:08 +01:00