mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-10 17:39:05 +00:00
* remove blks first try * dprint.json seems to be OK, some forgotten functions * add some more space-after-keyword settings * server remove blks * add **/files to dprint exclude * dprint.js fixes a typo * add boot.js and bootprefix.js to dprint exclude * dprint change dprint.json * add dprint fmt as script * remove jslint comments * fix whitespace * fix whitespace * remove function-wrapper from geospatial plugin * fix whitespace * add function wrapper to dyannotate-startup * remove dpring.json
27 lines
475 B
JavaScript
27 lines
475 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 "";
|
|
}
|
|
}
|