-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getIndex filter #1452
getIndex filter #1452
Conversation
Is `wiki.parseTextReference()` the appropriate way?
@@ -0,0 +1,32 @@ | |||
/*\ | |||
title: $:/core/modules/filters/getIndex.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's inconsistent to use "getIndex"; all the other two word filters just concatenate lower case words (eg, "removeprefix", "moduletypes"). The filename needs changing too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, changed
* renamed to all lowercase * added documentation * added examples
Looks good - @aelocson are the docs changes OK? |
code, docs and demo updated as suggested |
Thanks @tobibeer |
exports.getIndex = function(source,operator,options) {
...
}; It should be getindex. |
@BramChen, thanks for being watchful! |
As discussed at #1375, respectively #1375 (comment), for a data tiddler, returns the value at the index specified in the operand.
<$list filter="[[SomeData]getindex[someIndex]]"/>
demo: http://tbdemo.tiddlyspot.com/#Index%20Filter