Reworked support for processing
This commit is contained in:
parent
c1166680a8
commit
6a3157762a
14 changed files with 318 additions and 473 deletions
18
demo/main/processors/scream.js
Normal file
18
demo/main/processors/scream.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
export const name = "Scream";
|
||||
export function process(binding, opts) {
|
||||
const modifiedEntries = binding.entries.map(entry => {
|
||||
if (binding.markdownKey in entry.data) {
|
||||
entry.data = {
|
||||
...entry.data,
|
||||
[binding.markdownKey]: entry.data[binding.markdownKey].toUpperCase()
|
||||
}
|
||||
}
|
||||
|
||||
return entry;
|
||||
});
|
||||
|
||||
return {
|
||||
...binding,
|
||||
entries: modifiedEntries
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue