mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-20 00:34:50 +00:00
Refactored Dependencies() constructor
Now it's much easier to call
This commit is contained in:
parent
707a08540c
commit
0c4f877093
@ -14,9 +14,26 @@ Represents the dependencies of a tiddler or a parser node as two fields:
|
||||
|
||||
var utils = require("./Utils.js");
|
||||
|
||||
var Dependencies = function(tiddlers,dependentAll) {
|
||||
this.tiddlers = tiddlers || {};
|
||||
var Dependencies = function(skinnyTiddlers,fatTiddlers,dependentAll) {
|
||||
var t,tiddlerTitle;
|
||||
this.tiddlers = {};
|
||||
this.dependentAll = dependentAll;
|
||||
if(skinnyTiddlers) {
|
||||
for(t=0; t<skinnyTiddlers.length; t++) {
|
||||
tiddlerTitle = skinnyTiddlers[t];
|
||||
if(typeof tiddlerTitle === "string" && tiddlerTitle !== "") {
|
||||
this.tiddlers[tiddlerTitle] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(fatTiddlers) {
|
||||
for(t=0; t<fatTiddlers.length; t++) {
|
||||
tiddlerTitle = fatTiddlers[t];
|
||||
if(typeof tiddlerTitle === "string" && tiddlerTitle !== "") {
|
||||
this.tiddlers[tiddlerTitle] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user