updates to camp and things
This commit is contained in:
parent
16e1340a7c
commit
7724a42e73
442 changed files with 97335 additions and 8 deletions
25
static/js/cljs-runtime/com.cognitect.transit.impl.reader.js
Normal file
25
static/js/cljs-runtime/com.cognitect.transit.impl.reader.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
goog.provide("com.cognitect.transit.impl.reader");
|
||||
goog.require("com.cognitect.transit.impl.decoder");
|
||||
goog.require("com.cognitect.transit.caching");
|
||||
goog.scope(function() {
|
||||
var reader = com.cognitect.transit.impl.reader, decoder = com.cognitect.transit.impl.decoder, caching = com.cognitect.transit.caching;
|
||||
reader.JSONUnmarshaller = function Transit$JSONUnmarshaller(opts) {
|
||||
this.decoder = new decoder.Decoder(opts);
|
||||
};
|
||||
reader.JSONUnmarshaller.prototype.unmarshal = function(str, cache) {
|
||||
return this.decoder.decode(JSON.parse(str), cache);
|
||||
};
|
||||
reader.Reader = function Transit$Reader(unmarshaller, options) {
|
||||
this.unmarshaller = unmarshaller;
|
||||
this.options = options || {};
|
||||
this.cache = this.options["cache"] ? this.options["cache"] : new caching.ReadCache();
|
||||
};
|
||||
reader.Reader.prototype.read = function(str) {
|
||||
var ret = this.unmarshaller.unmarshal(str, this.cache);
|
||||
this.cache.clear();
|
||||
return ret;
|
||||
};
|
||||
reader.Reader.prototype["read"] = reader.Reader.prototype.read;
|
||||
});
|
||||
|
||||
//# sourceMappingURL=com.cognitect.transit.impl.reader.js.map
|
Loading…
Add table
Add a link
Reference in a new issue