mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 20:10:03 +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 utils = require("./Utils.js");
|
||||||
|
|
||||||
var Dependencies = function(tiddlers,dependentAll) {
|
var Dependencies = function(skinnyTiddlers,fatTiddlers,dependentAll) {
|
||||||
this.tiddlers = tiddlers || {};
|
var t,tiddlerTitle;
|
||||||
|
this.tiddlers = {};
|
||||||
this.dependentAll = dependentAll;
|
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