1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-02-24 10:59:49 +00:00
Files
TiddlyWiki5/plugins/tiddlywiki/tw2parser/entry.js
Saq Imtiaz 785086e0a5 Fixes ESLint errors (#9668)
* fix: apply automatic eslint fixes

* lint: allow hashbang comment for tiddlywiki.js

* lint: first back of manual lint fixes for unused vars

* lint: added more fixes for unused vars

* lint: missed files

* lint: updated eslint config with selected rules from #9669
2026-02-20 08:38:42 +00:00

27 lines
476 B
JavaScript

/*\
title: $:/macros/tiddlywiki/entry.js
type: application/javascript
module-type: macro
\*/
"use strict";
/*
Information about this macro
returns value of key in a data json tiddler
note that macros are not connected with the refresh mechanism -use with caution.
*/
exports.name = "entryof";
exports.params = [
{ name: "key" }, { name: "map" }
];
/*
Run the macro
*/
exports.run = function(key,map) {
try {
return JSON.parse(map)[key];
} catch(e) {
return "";
}
};