/*\ title: js/Tiddler.js Tiddlers are an immutable dictionary of name:value pairs called fields. Values can be a string, an array of strings, or a JavaScript date object. The only field that is required is the `title` field, but useful tiddlers also have a `text` field, and some or all of the standard fields `modified`, `modifier`, `created`, `creator`, `tags` and `type`. Hardcoded in the system is the knowledge that the 'tags' field is a string array, and that the 'modified' and 'created' fields are dates. All other fields are strings. \*/ (function(){ /*jslint node: true */ "use strict"; var utils = require("./Utils.js"), ArgParser = require("./ArgParser.js").ArgParser; var Tiddler = function(/* tiddler,fields */) { this.parseTree = null; // Caches the parse tree for the tiddler this.renderers = {}; // Caches rendering functions for this tiddler (indexed by MIME type) this.renditions = {}; // Caches the renditions produced by those functions (indexed by MIME type) this.fields = {}; for(var c=0; c