Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ml-matrix

Package Overview
Dependencies
Maintainers
7
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ml-matrix - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

10

History.md

@@ -0,1 +1,11 @@

<a name="1.2.1"></a>
## [1.2.1](https://github.com/mljs/matrix/compare/v1.2.0...v1.2.1) (2016-07-07)
### Bug Fixes
* do not use rest parameters ([2c4502e](https://github.com/mljs/matrix/commit/2c4502e))
<a name="1.2.0"></a>

@@ -2,0 +12,0 @@ # [1.2.0](https://github.com/mljs/matrix/compare/v1.1.5...v1.2.0) (2016-07-07)

2

package.json
{
"name": "ml-matrix",
"version": "1.2.0",
"version": "1.2.1",
"description": "Matrix manipulation and computation library",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -1341,6 +1341,6 @@ 'use strict';

var inplaceMethodWithArgs = `
(function %name%(...args) {
(function %name%(%args%) {
for (var i = 0; i < this.rows; i++) {
for (var j = 0; j < this.columns; j++) {
this[i][j] = %method%(this[i][j], ...args);
this[i][j] = %method%(this[i][j], %args%);
}

@@ -1353,5 +1353,5 @@ }

var staticMethodWithArgs = `
(function %name%(matrix, ...args) {
(function %name%(matrix, %args%) {
var newMatrix = new Matrix(matrix);
return newMatrix.%name%(...args);
return newMatrix.%name%(%args%);
})

@@ -1411,9 +1411,13 @@ `;

var methodsWithArgs = [
['Math.pow', 'pow']
['Math.pow', 1, 'pow']
];
for (var methodWithArg of methodsWithArgs) {
var inplaceMethWithArgs = eval(fillTemplateFunction(inplaceMethodWithArgs, {name: methodWithArg[1], method: methodWithArg[0]}));
var staticMethWithArgs = eval(fillTemplateFunction(staticMethodWithArgs, {name: methodWithArg[1]}));
for (var i = 1; i < methodWithArg.length; i++) {
var args = 'arg0';
for (var i = 1; i < methodWithArg[1]; i++) {
args += `, arg${i}`;
}
var inplaceMethWithArgs = eval(fillTemplateFunction(inplaceMethodWithArgs, {name: methodWithArg[2], method: methodWithArg[0], args: args}));
var staticMethWithArgs = eval(fillTemplateFunction(staticMethodWithArgs, {name: methodWithArg[2], args: args}));
for (var i = 2; i < methodWithArg.length; i++) {
Matrix.prototype[methodWithArg[i]] = inplaceMethWithArgs;

@@ -1420,0 +1424,0 @@ Matrix[methodWithArg[i]] = staticMethWithArgs;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc