mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-19 18:59:42 +00:00
28 lines
566 B
JavaScript
28 lines
566 B
JavaScript
/*\
|
|
title: $:/core/modules/filters/listed.js
|
|
type: application/javascript
|
|
module-type: filteroperator
|
|
|
|
Filter operator returning all tiddlers that have the selected tiddlers in a list
|
|
|
|
\*/
|
|
(function(){
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false */
|
|
"use strict";
|
|
|
|
/*
|
|
Export our filter function
|
|
*/
|
|
exports.listed = function(source,operator,options) {
|
|
var field = operator.operand || "list",
|
|
results = [];
|
|
source(function(tiddler,title) {
|
|
$tw.utils.pushTop(results,options.wiki.findListingsOfTiddler(title,field));
|
|
});
|
|
return results;
|
|
};
|
|
|
|
})();
|