mirror of
https://github.com/tenrok/BBob.git
synced 2026-05-15 11:59:37 +03:00
feat(core): allow to pass dynamic data in options for render (#59)
This commit is contained in:
@@ -18,6 +18,7 @@ export default function bbob(plugs) {
|
||||
|
||||
const parseFn = options.parser || parse;
|
||||
const renderFn = options.render;
|
||||
const data = options.data || null;
|
||||
|
||||
if (typeof parseFn !== 'function') {
|
||||
throw new Error('"parser" is not a function, please pass to "process(input, { parser })" right function');
|
||||
@@ -41,6 +42,7 @@ export default function bbob(plugs) {
|
||||
render: renderFn,
|
||||
iterate,
|
||||
match,
|
||||
data,
|
||||
}) || tree;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user