mathjs 7.5.0 → 7.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -89,7 +89,9 @@ export function deepExtend(a, b) {
89
89
  }
90
90
 
91
91
  for (var prop in b) {
92
- if (hasOwnProperty(b, prop)) {
92
+ // We check against prop not being in Object.prototype or Function.prototype
93
+ // to prevent polluting for example Object.__proto__.
94
+ if (hasOwnProperty(b, prop) && !(prop in Object.prototype) && !(prop in Function.prototype)) {
93
95
  if (b[prop] && b[prop].constructor === Object) {
94
96
  if (a[prop] === undefined) {
95
97
  a[prop] = {};
package/es/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export var version = '7.5.0'; // Note: This file is automatically generated when building math.js.
1
+ export var version = '7.5.1'; // Note: This file is automatically generated when building math.js.
2
2
  // Changes made in this file will be overwritten.
package/lib/header.js CHANGED
@@ -6,8 +6,8 @@
6
6
  * It features real and complex numbers, units, matrices, a large set of
7
7
  * mathematical functions, and a flexible expression parser.
8
8
  *
9
- * @version 7.5.0
10
- * @date 2020-10-07
9
+ * @version 7.5.1
10
+ * @date 2020-10-10
11
11
  *
12
12
  * @license
13
13
  * Copyright (C) 2013-2020 Jos de Jong <wjosdejong@gmail.com>
@@ -114,7 +114,9 @@ function deepExtend(a, b) {
114
114
  }
115
115
 
116
116
  for (var prop in b) {
117
- if (hasOwnProperty(b, prop)) {
117
+ // We check against prop not being in Object.prototype or Function.prototype
118
+ // to prevent polluting for example Object.__proto__.
119
+ if (hasOwnProperty(b, prop) && !(prop in Object.prototype) && !(prop in Function.prototype)) {
118
120
  if (b[prop] && b[prop].constructor === Object) {
119
121
  if (a[prop] === undefined) {
120
122
  a[prop] = {};
package/lib/version.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.version = void 0;
7
- var version = '7.5.0'; // Note: This file is automatically generated when building math.js.
7
+ var version = '7.5.1'; // Note: This file is automatically generated when building math.js.
8
8
  // Changes made in this file will be overwritten.
9
9
 
10
10
  exports.version = version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mathjs",
3
- "version": "7.5.0",
3
+ "version": "7.5.1",
4
4
  "description": "Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with different data types like numbers, big numbers, complex numbers, fractions, units, and matrices.",
5
5
  "author": "Jos de Jong <wjosdejong@gmail.com> (https://github.com/josdejong)",
6
6
  "homepage": "https://mathjs.org",
@@ -86,7 +86,9 @@ export function deepExtend (a, b) {
86
86
  }
87
87
 
88
88
  for (const prop in b) {
89
- if (hasOwnProperty(b, prop)) {
89
+ // We check against prop not being in Object.prototype or Function.prototype
90
+ // to prevent polluting for example Object.__proto__.
91
+ if (hasOwnProperty(b, prop) && !(prop in Object.prototype) && !(prop in Function.prototype)) {
90
92
  if (b[prop] && b[prop].constructor === Object) {
91
93
  if (a[prop] === undefined) {
92
94
  a[prop] = {}
package/src/version.js CHANGED
@@ -1,3 +1,3 @@
1
- export const version = '7.5.0'
1
+ export const version = '7.5.1'
2
2
  // Note: This file is automatically generated when building math.js.
3
3
  // Changes made in this file will be overwritten.