1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-02 18:23:28 +00:00
TiddlyWiki5/core/modules/filters/links.js
2021-01-05 17:36:18 +00:00

27 lines
516 B
JavaScript

/*\
title: $:/core/modules/filters/links.js
type: application/javascript
module-type: filteroperator
Filter operator for returning all the links from a tiddler
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.links = function(source,operator,options) {
var results = new $tw.utils.LinkedList();
source(function(tiddler,title) {
results.pushTop(options.wiki.getTiddlerLinks(title));
});
return results.toArray();
};
})();