mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-08-19 14:16:17 +00:00
![Jermolene](/assets/img/avatar_default.png)
For backwards compatibility, we now explicitly request the cacheable version of this method. Fixes #1873
31 lines
569 B
JavaScript
31 lines
569 B
JavaScript
/*\
|
|
title: $:/core/modules/filters/indexes.js
|
|
type: application/javascript
|
|
module-type: filteroperator
|
|
|
|
Filter operator for returning the indexes of a data tiddler
|
|
|
|
\*/
|
|
(function(){
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false */
|
|
"use strict";
|
|
|
|
/*
|
|
Export our filter function
|
|
*/
|
|
exports.indexes = function(source,operator,options) {
|
|
var results = [];
|
|
source(function(tiddler,title) {
|
|
var data = options.wiki.getTiddlerDataCached(title);
|
|
if(data) {
|
|
$tw.utils.pushTop(results,Object.keys(data));
|
|
}
|
|
});
|
|
results.sort();
|
|
return results;
|
|
};
|
|
|
|
})();
|