2013-10-23 22:11:41 +00:00
|
|
|
/*\
|
|
|
|
title: $:/core/modules/filters/modules.js
|
|
|
|
type: application/javascript
|
|
|
|
module-type: filteroperator
|
|
|
|
|
|
|
|
Filter operator for returning the titles of the modules of a given type in this wiki
|
|
|
|
|
|
|
|
\*/
|
|
|
|
(function(){
|
|
|
|
|
|
|
|
/*jslint node: true, browser: true */
|
|
|
|
/*global $tw: false */
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
/*
|
|
|
|
Export our filter function
|
|
|
|
*/
|
|
|
|
exports.modules = function(source,operator,options) {
|
2014-04-03 19:49:16 +00:00
|
|
|
var results = [];
|
|
|
|
source(function(tiddler,title) {
|
|
|
|
$tw.utils.each($tw.modules.types[title],function(moduleInfo,moduleName) {
|
|
|
|
results.push(moduleName);
|
2013-10-23 22:11:41 +00:00
|
|
|
});
|
2014-04-03 19:49:16 +00:00
|
|
|
});
|
2013-10-23 22:11:41 +00:00
|
|
|
results.sort();
|
|
|
|
return results;
|
|
|
|
};
|
|
|
|
|
|
|
|
})();
|