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

labs-core

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

labs-core - npm Package Compare versions

Comparing version 0.2.3 to 0.2.5

test/derivative.js

2

package.json
{
"name": "labs-core",
"version": "0.2.3",
"version": "0.2.5",
"description": "Core classes to Labs : expression, dimensions, multipliers, et cetera.",

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

@@ -11,10 +11,10 @@ const Exp = require('./exp-base');

if (this.isLiteral()) {
return literal(0);
return Exp.literal(0);
} else if (this.isIdentifier()) {
return this.name === dLiteral ? literal(1) : literal(0);
return this.name === dLiteral ? Exp.literal(1) : Exp.literal(0);
} else {
var der = DERIVATIVES[this.fn],
args = this.args;
return call('+', args.map(function(arg, i) {
return call('*', [der(args, i), arg.derivative(dLiteral)]);
return Exp.call('+', args.map(function(arg, i) {
return Exp.call('*', [der(args, i), arg.derivative(dLiteral)]);
}));

@@ -21,0 +21,0 @@ }

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