@util.js/numbers 0.41.4 → 0.41.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -32,6 +32,5 @@
32
32
  "type": "git",
33
33
  "url": "https://github.com/creemama/utiljs/tree/master/packages/utiljs-numbers"
34
34
  },
35
- "version": "0.41.4",
36
- "gitHead": "2119863a175cf7095ca3a2417e61af32974add15"
35
+ "version": "0.41.6"
37
36
  }
@@ -6,7 +6,7 @@ const numbers = require("..");
6
6
  describe("Numbers#abs(x)", () => {
7
7
  it("should calculate correctly", () => {
8
8
  expect(numbers.abs(numbers.NEGATIVE_INFINITY)).to.eql(
9
- numbers.POSITIVE_INFINITY
9
+ numbers.POSITIVE_INFINITY,
10
10
  );
11
11
  });
12
12
  });
package/dist/Numbers.js DELETED
@@ -1,358 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
- var _acosh = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/math/acosh"));
5
- var _asinh = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/math/asinh"));
6
- var _atanh = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/math/atanh"));
7
- var _cbrt = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/math/cbrt"));
8
- var _clz = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/math/clz32"));
9
- var _cosh = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/math/cosh"));
10
- var _expm = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/math/expm1"));
11
- var _fround = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/math/fround"));
12
- var _hypot = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/math/hypot"));
13
- var _imul = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/math/imul"));
14
- var _isFinite = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/number/is-finite"));
15
- var _isInteger = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/number/is-integer"));
16
- var _isNan = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/number/is-nan"));
17
- var _isSafeInteger = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/number/is-safe-integer"));
18
- var _log = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/math/log10"));
19
- var _log1p = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/math/log1p"));
20
- var _log2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/math/log2"));
21
- var _parseFloat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/number/parse-float"));
22
- var _parseInt = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/number/parse-int"));
23
- var _sign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/math/sign"));
24
- var _sinh = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/math/sinh"));
25
- var _tanh = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/math/tanh"));
26
- var _trunc = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/math/trunc"));
27
- var _epsilon = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/number/epsilon"));
28
- var _maxSafeInteger = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/number/max-safe-integer"));
29
- var _minSafeInteger = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/number/min-safe-integer"));
30
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
31
- var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
32
- var Numbers = /*#__PURE__*/function () {
33
- function Numbers() {
34
- (0, _classCallCheck2["default"])(this, Numbers);
35
- }
36
- return (0, _createClass2["default"])(Numbers, [{
37
- key: "abs",
38
- value: function abs() {
39
- return Math.abs.apply(Math, arguments);
40
- }
41
- }, {
42
- key: "acos",
43
- value: function acos() {
44
- return Math.acos.apply(Math, arguments);
45
- }
46
- }, {
47
- key: "acosh",
48
- value: function acosh() {
49
- return _acosh["default"].apply(Math, arguments);
50
- }
51
- }, {
52
- key: "ascendingComparator",
53
- value: function ascendingComparator() {
54
- var thiz = this;
55
- return function (a, b) {
56
- if (thiz.isNaN(a)) {
57
- if (thiz.isNaN(b)) return 0;else return 1;
58
- } else if (thiz.isNaN(b)) {
59
- return -1;
60
- }
61
- return a - b;
62
- };
63
- }
64
- }, {
65
- key: "asin",
66
- value: function asin() {
67
- return Math.asin.apply(Math, arguments);
68
- }
69
- }, {
70
- key: "asinh",
71
- value: function asinh() {
72
- return _asinh["default"].apply(Math, arguments);
73
- }
74
- }, {
75
- key: "atan",
76
- value: function atan() {
77
- return Math.atan.apply(Math, arguments);
78
- }
79
- }, {
80
- key: "atan2",
81
- value: function atan2() {
82
- return Math.atan2.apply(Math, arguments);
83
- }
84
- }, {
85
- key: "atanh",
86
- value: function atanh() {
87
- return _atanh["default"].apply(Math, arguments);
88
- }
89
- }, {
90
- key: "cbrt",
91
- value: function cbrt() {
92
- return _cbrt["default"].apply(Math, arguments);
93
- }
94
- }, {
95
- key: "ceil",
96
- value: function ceil() {
97
- return Math.ceil.apply(Math, arguments);
98
- }
99
- }, {
100
- key: "clz32",
101
- value: function clz32() {
102
- return _clz["default"].apply(Math, arguments);
103
- }
104
- }, {
105
- key: "cos",
106
- value: function cos() {
107
- return Math.cos.apply(Math, arguments);
108
- }
109
- }, {
110
- key: "cosh",
111
- value: function cosh() {
112
- return _cosh["default"].apply(Math, arguments);
113
- }
114
- }, {
115
- key: "descendingComparator",
116
- value: function descendingComparator() {
117
- var thiz = this;
118
- return function (a, b) {
119
- if (thiz.isNaN(a)) {
120
- if (thiz.isNaN(b)) return 0;else return -1;
121
- } else if (thiz.isNaN(b)) {
122
- return 1;
123
- }
124
- return b - a;
125
- };
126
- }
127
- }, {
128
- key: "exp",
129
- value: function exp() {
130
- return Math.exp.apply(Math, arguments);
131
- }
132
- }, {
133
- key: "expm1",
134
- value: function expm1() {
135
- return _expm["default"].apply(Math, arguments);
136
- }
137
- }, {
138
- key: "floor",
139
- value: function floor() {
140
- return Math.floor.apply(Math, arguments);
141
- }
142
- }, {
143
- key: "fround",
144
- value: function fround() {
145
- return _fround["default"].apply(Math, arguments);
146
- }
147
- }, {
148
- key: "hypot",
149
- value: function hypot() {
150
- return _hypot["default"].apply(Math, arguments);
151
- }
152
- }, {
153
- key: "imul",
154
- value: function imul() {
155
- return _imul["default"].apply(Math, arguments);
156
- }
157
- }, {
158
- key: "isFinite",
159
- value: function isFinite() {
160
- return _isFinite["default"].apply(Number, arguments);
161
- }
162
-
163
- // http://stackoverflow.com/questions/14636536/how-to-check-if-a-variable-is-an-integer-in-javascript
164
- }, {
165
- key: "isInt",
166
- value: function isInt(value) {
167
- if (this.isNaN(value)) return false;
168
- var x = this.parseFloat(value);
169
- return (x | 0) === x;
170
- }
171
- }, {
172
- key: "isInteger",
173
- value: function isInteger() {
174
- return _isInteger["default"].apply(Number, arguments);
175
- }
176
- }, {
177
- key: "isNaN",
178
- value: function isNaN() {
179
- return _isNan["default"].apply(Number, arguments);
180
- }
181
- }, {
182
- key: "isSafeInteger",
183
- value: function isSafeInteger() {
184
- return _isSafeInteger["default"].apply(Number, arguments);
185
- }
186
- }, {
187
- key: "log",
188
- value: function log() {
189
- return Math.log.apply(Math, arguments);
190
- }
191
- }, {
192
- key: "log10",
193
- value: function log10() {
194
- return _log["default"].apply(Math, arguments);
195
- }
196
- }, {
197
- key: "log1p",
198
- value: function log1p() {
199
- return _log1p["default"].apply(Math, arguments);
200
- }
201
- }, {
202
- key: "log2",
203
- value: function log2() {
204
- return _log2["default"].apply(Math, arguments);
205
- }
206
- }, {
207
- key: "max",
208
- value: function max() {
209
- return Math.max.apply(Math, arguments);
210
- }
211
- }, {
212
- key: "min",
213
- value: function min() {
214
- return Math.min.apply(Math, arguments);
215
- }
216
- }, {
217
- key: "parseFloat",
218
- value: function parseFloat() {
219
- return _parseFloat["default"].apply(Number, arguments);
220
- }
221
- }, {
222
- key: "parseInt",
223
- value: function parseInt() {
224
- return _parseInt["default"].apply(Number, arguments);
225
- }
226
- }, {
227
- key: "pow",
228
- value: function pow() {
229
- return Math.pow.apply(Math, arguments);
230
- }
231
- }, {
232
- key: "random",
233
- value: function random() {
234
- return Math.random.apply(Math, arguments);
235
- }
236
- }, {
237
- key: "round",
238
- value: function round() {
239
- return Math.round.apply(Math, arguments);
240
- }
241
- }, {
242
- key: "sign",
243
- value: function sign() {
244
- return _sign["default"].apply(Math, arguments);
245
- }
246
- }, {
247
- key: "sin",
248
- value: function sin() {
249
- return Math.sin.apply(Math, arguments);
250
- }
251
- }, {
252
- key: "sinh",
253
- value: function sinh() {
254
- return _sinh["default"].apply(Math, arguments);
255
- }
256
- }, {
257
- key: "sqrt",
258
- value: function sqrt() {
259
- return Math.sqrt.apply(Math, arguments);
260
- }
261
- }, {
262
- key: "tan",
263
- value: function tan() {
264
- return Math.tan.apply(Math, arguments);
265
- }
266
- }, {
267
- key: "tanh",
268
- value: function tanh() {
269
- return _tanh["default"].apply(Math, arguments);
270
- }
271
- }, {
272
- key: "trunc",
273
- value: function trunc() {
274
- return _trunc["default"].apply(Math, arguments);
275
- }
276
- }, {
277
- key: "E",
278
- get: function get() {
279
- return Math.E;
280
- }
281
- }, {
282
- key: "EPSILON",
283
- get: function get() {
284
- return _epsilon["default"];
285
- }
286
- }, {
287
- key: "LN10",
288
- get: function get() {
289
- return Math.LN10;
290
- }
291
- }, {
292
- key: "LN2",
293
- get: function get() {
294
- return Math.LN2;
295
- }
296
- }, {
297
- key: "LOG10E",
298
- get: function get() {
299
- return Math.LOG10E;
300
- }
301
- }, {
302
- key: "LOG2E",
303
- get: function get() {
304
- return Math.LOG2E;
305
- }
306
- }, {
307
- key: "MAX_SAFE_INTEGER",
308
- get: function get() {
309
- return _maxSafeInteger["default"];
310
- }
311
- }, {
312
- key: "MAX_VALUE",
313
- get: function get() {
314
- return Number.MAX_VALUE;
315
- }
316
- }, {
317
- key: "MIN_SAFE_INTEGER",
318
- get: function get() {
319
- return _minSafeInteger["default"];
320
- }
321
- }, {
322
- key: "MIN_VALUE",
323
- get: function get() {
324
- return Number.MIN_VALUE;
325
- }
326
- }, {
327
- key: "NEGATIVE_INFINITY",
328
- get: function get() {
329
- return Number.NEGATIVE_INFINITY;
330
- }
331
- }, {
332
- key: "NaN",
333
- get: function get() {
334
- return Number.NaN;
335
- }
336
- }, {
337
- key: "PI",
338
- get: function get() {
339
- return Math.PI;
340
- }
341
- }, {
342
- key: "POSITIVE_INFINITY",
343
- get: function get() {
344
- return Number.POSITIVE_INFINITY;
345
- }
346
- }, {
347
- key: "SQRT1_2",
348
- get: function get() {
349
- return Math.SQRT1_2;
350
- }
351
- }, {
352
- key: "SQRT2",
353
- get: function get() {
354
- return Math.SQRT2;
355
- }
356
- }]);
357
- }();
358
- module.exports = Numbers;