mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-05 20:16:48 +00:00
![Cameron Fischer](/assets/img/avatar_default.png)
* Changed the filterrunprefixes to use LinkedList * Testing for Linked List * Finishing touches to LinkedList * Minor corrections to link-list coding style * Corrected for sneaky bug in linkedList
29 lines
669 B
JavaScript
29 lines
669 B
JavaScript
/*\
|
|
title: $:/core/modules/filterrunprefixes/and.js
|
|
type: application/javascript
|
|
module-type: filterrunprefix
|
|
|
|
Intersection of sets.
|
|
Equivalent to + filter run prefix.
|
|
|
|
\*/
|
|
(function(){
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false */
|
|
"use strict";
|
|
|
|
/*
|
|
Export our filter prefix function
|
|
*/
|
|
exports.and = function(operationSubFunction,options) {
|
|
return function(results,source,widget) {
|
|
// This replaces all the elements of the array, but keeps the actual array so that references to it are preserved
|
|
source = options.wiki.makeTiddlerIterator(results.toArray());
|
|
results.clear();
|
|
results.pushTop(operationSubFunction(source,widget));
|
|
};
|
|
};
|
|
|
|
})();
|