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

alamid-junction

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alamid-junction - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

4

lib/Junction.js

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

};
signal(this._values[key]);
if (this._values.hasOwnProperty(key)) {
signal(this._values[key]);
}
signal.subscribe(function onSignalChange(newValue) {

@@ -174,0 +176,0 @@ self._values[key] = self.setter(key, newValue);

{
"name": "alamid-junction",
"version": "0.9.0",
"version": "0.9.1",
"description": "Provides convenient methods for setting and retrieving multiple signals",

@@ -5,0 +5,0 @@ "main": "./lib/Junction.js",

@@ -45,9 +45,11 @@ "use strict";

describe(".prototype", function () {
var givenValue;
function Signal() {
var listener;
var listener,
givenValue;
function signal(value) {
if (arguments.length === 1) {
if (signal.setter) {
value = signal.setter(value);
}
givenValue = value;

@@ -259,5 +261,7 @@ listener && listener(value);

expect(greeting()).to.equal(34);
expect(greeting()).to.equal("Ahoy!");
expect(age()).to.equal(34);
junction.reset();
expect(greeting()).to.equal(undefined);
expect(age()).to.equal(undefined);
});

@@ -331,6 +335,14 @@

it("should return a signal representing the value specified by key", function () {
var greeting = junction.signal("greeting");
var greeting,
name;
junction.set("name", "The mighty pirate");
name = junction.signal("name");
greeting = junction.signal("greeting");
expect(greeting()).to.equal(undefined);
expect(name()).to.equal("The mighty pirate");
junction.set("greeting", "Ahoy!");
expect(greeting()).to.equal("Ahoy!");

@@ -337,0 +349,0 @@ expect(junction.get("greeting")).to.equal("Ahoy!");

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