New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sum-product

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sum-product - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

index.js

6

package.json
{
"name": "sum-product",
"version": "0.0.1",
"description": "classic spreadsheet sum or array item products",
"version": "0.0.2",
"description": "classic spreadsheet sum of array item products",
"author": "Hugo Villeneuve",

@@ -19,3 +19,3 @@ "license": "MIT",

},
"main": "./src/index.js",
"main": "./index.js",
"dependencies": {},

@@ -22,0 +22,0 @@ "devDependencies": {

@@ -12,3 +12,3 @@ # sum-product

Simple and small standalone function to calculate the sum of the product of items in the parameters
Simple and small standalone function to calculate the sum of the product of array items.
`sumProduct([0,1], [2,3], [4,5]) // 0*2*4 + 1*3*5 = 15`

@@ -28,5 +28,9 @@

var result = sumProduct([0,1], [2,3], [4,5]) // 0*2*4 + 1*3*5 = 15
result = sumProduct() // ==>0
result = sumProduct([]) // ==>0
result = sumProduct([a]) // ==>NaN
```
## Test

@@ -33,0 +37,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