mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-08-28 12:02:40 +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
28 lines
510 B
JavaScript
28 lines
510 B
JavaScript
/*\
|
|
title: $:/core/modules/filterrunprefixes/else.js
|
|
type: application/javascript
|
|
module-type: filterrunprefix
|
|
|
|
Equivalent to ~ filter run prefix.
|
|
|
|
\*/
|
|
(function(){
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false */
|
|
"use strict";
|
|
|
|
/*
|
|
Export our filter prefix function
|
|
*/
|
|
exports.else = function(operationSubFunction) {
|
|
return function(results,source,widget) {
|
|
if(results.length === 0) {
|
|
// Main result so far is empty
|
|
results.pushTop(operationSubFunction(source,widget));
|
|
}
|
|
};
|
|
};
|
|
|
|
})();
|