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

@pencilpix/peaks

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pencilpix/peaks - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

18

canvas.js

@@ -83,7 +83,7 @@ const { createCanvas, loadImage } = require('canvas')

const { height, peaks } = this
const absmax = 1
//const absmax = 1
const hasMinValue = peaks.some(p => p < 0)
// should be used if we need to normalize
// const [min, max, hasMinValue] = $getMaxMin(peaks)
// const absmax = -min > max ? -min : max // normalized max.
const { min, max } = this.getMaxMin(peaks)
const absmax = -min > max ? -min : max // normalized max.
const offsetY = 0

@@ -120,3 +120,15 @@ const halfH = height / 2

}
getMaxMin(peaks) {
let min = 0
let max = 0
peaks.forEach(peak => {
if (peak < min) min = peak
if (peak > max) max = peak
})
return { min, max }
}
}

2

package.json
{
"name": "@pencilpix/peaks",
"version": "0.2.0",
"version": "0.2.1",
"description": "nodejs server that accept posting a url of audio file and respond with it's peaks.",

@@ -5,0 +5,0 @@ "main": "Server.js",

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