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

audio-slot

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

audio-slot - npm Package Compare versions

Comparing version 4.9.0 to 4.9.1

2

package.json
{
"name": "audio-slot",
"version": "4.9.0",
"version": "4.9.1",
"description": "Web Audio API FRP wrapper for creating, routing, and triggering AudioNodes.",

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

@@ -16,2 +16,3 @@ var Observ = require('observ')

var refreshingConnections = false
var connections = []
var extraConnections = []

@@ -38,10 +39,16 @@

obs.connect = function (to) {
extraConnections.push(to)
refreshConnections()
obs.connect = function (destination) {
output.connect(destination)
extraConnections.push(destination)
}
obs.disconnect = function () {
extraConnections.length = 0
refreshConnections()
obs.disconnect = function (destination) {
if (destination) {
remove(extraConnections, destination)
output.disconnect(destination)
} else {
while (extraConnections.length) {
output.disconnect(extraConnections.pop())
}
}
}

@@ -68,10 +75,4 @@

function refreshConnections () {
var outputs = []
refreshingConnections = false
output.disconnect()
extraConnections.forEach(function (target) {
output.connect(target)
})
var outputNames = typeof obs.output() === 'string' ? [obs.output()] : obs.output()

@@ -83,7 +84,28 @@

if (destinationSlot && destinationSlot.input) {
output.connect(destinationSlot.input)
outputs.push(destinationSlot.input)
}
})
}
connections.forEach(function (node) {
if (!~outputs.indexOf(node)) {
output.disconnect(node)
}
})
outputs.forEach(function (node) {
if (!~connections.indexOf(node)) {
output.connect(node)
}
})
connections = outputs
}
}
function remove (array, item) {
var index = array.indexOf(item)
if (~index) {
array.splice(index, 1)
}
}
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