From a0670ec3a3400c6ee9f31a23d4024f42157a5332 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sat, 6 Feb 2016 07:42:16 -0500 Subject: [PATCH] Simple Seal class --- js/src/main.js | 1 + js/src/seal.js | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 js/src/seal.js diff --git a/js/src/main.js b/js/src/main.js index 57d881c..fd18f2b 100644 --- a/js/src/main.js +++ b/js/src/main.js @@ -18,6 +18,7 @@ copyKeys(['__', '_$', '$Capture', '$Special', module.exports.Route); module.exports.DemandMatcher = require('./demand-matcher.js').DemandMatcher; +module.exports.Seal = require('./seal.js').Seal; // module.exports.DOM = require("./dom-driver.js"); module.exports.JQuery = require("./jquery-driver.js"); diff --git a/js/src/seal.js b/js/src/seal.js new file mode 100644 index 0000000..f30c996 --- /dev/null +++ b/js/src/seal.js @@ -0,0 +1,10 @@ +function Seal(contents) { + this.sealContents = contents; +} + +Seal.prototype.equals = function (other) { + if (!(other instanceof Seal)) return false; + return Immutable.is(this.sealContents, other.sealContents); +}; + +module.exports.Seal = Seal;