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

frame-hop

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

frame-hop - npm Package Compare versions

Comparing version 0.0.0 to 1.0.0

2

hop.js

@@ -10,3 +10,3 @@ "use strict"

max_data_size = max_data_size || frame_size
var buffer = new Float32Array(frame_size + max_data_size)
var buffer = new Float32Array(2*frame_size + max_data_size)
var ptr = 0

@@ -13,0 +13,0 @@ var frame_slices = []

{
"name": "frame-hop",
"version": "0.0.0",
"version": "1.0.0",
"description": "Frame slicing for windowed signal processing",

@@ -9,4 +9,3 @@ "main": "hop.js",

},
"dependencies": {
},
"dependencies": {},
"devDependencies": {

@@ -13,0 +12,0 @@ "tape": "~1.0.4"

@@ -5,3 +5,3 @@ "use strict"

require("tape")("frame-hop", function(t) {
require("tape")("frame-hop unaligned", function(t) {

@@ -32,3 +32,44 @@ var expected_frames = [

pushData([14,15,16,17,18,19,20,21])
t.equals(expected_frames.length, 0)
t.end()
})
require("tape")("frame-hop aligned", function(t) {
var expected_frames = [
[0,1,2,3],
[2,3,4,5],
[4,5,6,7],
[6,7,8,9],
[8,9,10,11],
[10,11,12,13],
[12,13,14,15],
[14,15,16,17],
[16,17,18,19],
[18,19,20,21]
]
var slicer = frameHop(4, 2, function(x) {
var f = expected_frames[0]
expected_frames.shift()
t.same(f, Array.prototype.slice.call(x, 0))
}, 8)
function pushData(arr) {
slicer(new Float32Array(arr))
}
pushData([0,1,2])
pushData([3,4])
pushData([5,6,7,8,9,10,11])
pushData([12,13])
pushData([14,15,16,17,18,19,20,21])
t.equals(expected_frames.length, 0)
t.end()
})
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