1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Adding [is[binary]] filter -- Missed off 1150c87ed

This commit is contained in:
Jeremy Ruston 2019-09-16 16:16:03 +01:00
parent 1150c87edb
commit 8c89461291

View File

@ -0,0 +1,36 @@
/*\
title: $:/core/modules/filters/is/binary.js
type: application/javascript
module-type: isfilteroperator
Filter function for [is[binary]]
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.binary = function(source,prefix,options) {
var results = [];
if(prefix === "!") {
source(function(tiddler,title) {
if(!options.wiki.isBinaryTiddler(title)) {
results.push(title);
}
});
} else {
source(function(tiddler,title) {
if(options.wiki.isBinaryTiddler(title)) {
results.push(title);
}
});
}
return results;
};
})();