Skip to content

Commit

Permalink
v1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rkuykendall committed Mar 5, 2019
1 parent 97f4de9 commit 1cc27fc
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 33 deletions.
10 changes: 5 additions & 5 deletions dist/interfaces.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export interface IAddress {
address1?: string;
address2?: string;
city?: string;
state?: string;
zip_code?: string;
address1?: string | null;
address2?: string | null;
city?: string | null;
state?: string | null;
zip_code?: string | null;
}
52 changes: 43 additions & 9 deletions dist/utils.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@ var parser = _interopDefault(require('html-react-parser'));
var lodash = require('lodash');

/*
*
* decimal.js v10.0.2
* decimal.js v10.1.1
* An arbitrary-precision Decimal type for JavaScript.
* https://github.com/MikeMcl/decimal.js
* Copyright (c) 2018 Michael Mclaughlin <[email protected]>
* Copyright (c) 2019 Michael Mclaughlin <[email protected]>
* MIT Licence
* https://github.com/MikeMcl/decimal.js/LICENCE
*
*/


Expand Down Expand Up @@ -4271,8 +4268,27 @@ function clone(obj) {
// Duplicate.
if (v instanceof Decimal) {
x.s = v.s;
x.e = v.e;
x.d = (v = v.d) ? v.slice() : v;

if (external) {
if (!v.d || v.e > Decimal.maxE) {

// Infinity.
x.e = NaN;
x.d = null;
} else if (v.e < Decimal.minE) {

// Zero.
x.e = 0;
x.d = [0];
} else {
x.e = v.e;
x.d = v.d.slice();
}
} else {
x.e = v.e;
x.d = v.d ? v.d.slice() : v.d;
}

return;
}

Expand All @@ -4296,8 +4312,23 @@ function clone(obj) {
// Fast path for small integers.
if (v === ~~v && v < 1e7) {
for (e = 0, i = v; i >= 10; i /= 10) e++;
x.e = e;
x.d = [v];

if (external) {
if (e > Decimal.maxE) {
x.e = NaN;
x.d = null;
} else if (e < Decimal.minE) {
x.e = 0;
x.d = [0];
} else {
x.e = e;
x.d = [v];
}
} else {
x.e = e;
x.d = [v];
}

return;

// Infinity, NaN.
Expand Down Expand Up @@ -4800,6 +4831,9 @@ function trunc(x) {
}


P[Symbol.for('nodejs.util.inspect.custom')] = P.toString;
P[Symbol.toStringTag] = 'Decimal';

// Create and configure initial Decimal constructor.
var Decimal = clone(DEFAULTS);

Expand Down
52 changes: 43 additions & 9 deletions dist/utils.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ import parser from 'html-react-parser';
import { isString, isNumber, has, result, get, times, isBoolean, escape, startCase, sortBy, map, reject, mapValues } from 'lodash';

/*
*
* decimal.js v10.0.2
* decimal.js v10.1.1
* An arbitrary-precision Decimal type for JavaScript.
* https://github.com/MikeMcl/decimal.js
* Copyright (c) 2018 Michael Mclaughlin <[email protected]>
* Copyright (c) 2019 Michael Mclaughlin <[email protected]>
* MIT Licence
* https://github.com/MikeMcl/decimal.js/LICENCE
*
*/


Expand Down Expand Up @@ -4264,8 +4261,27 @@ function clone(obj) {
// Duplicate.
if (v instanceof Decimal) {
x.s = v.s;
x.e = v.e;
x.d = (v = v.d) ? v.slice() : v;

if (external) {
if (!v.d || v.e > Decimal.maxE) {

// Infinity.
x.e = NaN;
x.d = null;
} else if (v.e < Decimal.minE) {

// Zero.
x.e = 0;
x.d = [0];
} else {
x.e = v.e;
x.d = v.d.slice();
}
} else {
x.e = v.e;
x.d = v.d ? v.d.slice() : v.d;
}

return;
}

Expand All @@ -4289,8 +4305,23 @@ function clone(obj) {
// Fast path for small integers.
if (v === ~~v && v < 1e7) {
for (e = 0, i = v; i >= 10; i /= 10) e++;
x.e = e;
x.d = [v];

if (external) {
if (e > Decimal.maxE) {
x.e = NaN;
x.d = null;
} else if (e < Decimal.minE) {
x.e = 0;
x.d = [0];
} else {
x.e = e;
x.d = [v];
}
} else {
x.e = e;
x.d = [v];
}

return;

// Infinity, NaN.
Expand Down Expand Up @@ -4793,6 +4824,9 @@ function trunc(x) {
}


P[Symbol.for('nodejs.util.inspect.custom')] = P.toString;
P[Symbol.toStringTag] = 'Decimal';

// Create and configure initial Decimal constructor.
var Decimal = clone(DEFAULTS);

Expand Down
52 changes: 43 additions & 9 deletions dist/utils.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@
parser = parser && parser.hasOwnProperty('default') ? parser['default'] : parser;

/*
*
* decimal.js v10.0.2
* decimal.js v10.1.1
* An arbitrary-precision Decimal type for JavaScript.
* https://github.com/MikeMcl/decimal.js
* Copyright (c) 2018 Michael Mclaughlin <[email protected]>
* Copyright (c) 2019 Michael Mclaughlin <[email protected]>
* MIT Licence
* https://github.com/MikeMcl/decimal.js/LICENCE
*
*/


Expand Down Expand Up @@ -4265,8 +4262,27 @@
// Duplicate.
if (v instanceof Decimal) {
x.s = v.s;
x.e = v.e;
x.d = (v = v.d) ? v.slice() : v;

if (external) {
if (!v.d || v.e > Decimal.maxE) {

// Infinity.
x.e = NaN;
x.d = null;
} else if (v.e < Decimal.minE) {

// Zero.
x.e = 0;
x.d = [0];
} else {
x.e = v.e;
x.d = v.d.slice();
}
} else {
x.e = v.e;
x.d = v.d ? v.d.slice() : v.d;
}

return;
}

Expand All @@ -4290,8 +4306,23 @@
// Fast path for small integers.
if (v === ~~v && v < 1e7) {
for (e = 0, i = v; i >= 10; i /= 10) e++;
x.e = e;
x.d = [v];

if (external) {
if (e > Decimal.maxE) {
x.e = NaN;
x.d = null;
} else if (e < Decimal.minE) {
x.e = 0;
x.d = [0];
} else {
x.e = e;
x.d = [v];
}
} else {
x.e = e;
x.d = [v];
}

return;

// Infinity, NaN.
Expand Down Expand Up @@ -4794,6 +4825,9 @@
}


P[Symbol.for('nodejs.util.inspect.custom')] = P.toString;
P[Symbol.toStringTag] = 'Decimal';

// Create and configure initial Decimal constructor.
var Decimal = clone(DEFAULTS);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mighty-justice/utils",
"version": "1.1.0",
"version": "1.1.1",
"description": "Standardization of small utilities across Mighty",
"main": "dist/utils.cjs.js",
"module": "dist/utils.esm.js",
Expand Down

0 comments on commit 1cc27fc

Please sign in to comment.