mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-07-04 19:23:29 +00:00
24 lines
443 B
JavaScript
24 lines
443 B
JavaScript
|
/*\
|
||
|
title: $:/plugins/tiddlywiki/static/filters/slugify.js
|
||
|
type: application/javascript
|
||
|
module-type: filteroperator
|
||
|
|
||
|
Filter operator for slugifying a tiddler title
|
||
|
|
||
|
\*/
|
||
|
(function(){
|
||
|
|
||
|
/*jslint node: true, browser: true */
|
||
|
/*global $tw: false */
|
||
|
"use strict";
|
||
|
|
||
|
exports.slugify = function(source,operator,options) {
|
||
|
var results = [];
|
||
|
source(function(tiddler,title) {
|
||
|
results.push(options.wiki.slugify(title));
|
||
|
});
|
||
|
return results;
|
||
|
};
|
||
|
|
||
|
})();
|