From c08dd0f5c6a0d0b442c7367740b04470f088bd7e Mon Sep 17 00:00:00 2001 From: Florian Heuberger Date: Tue, 12 Jul 2022 20:53:55 +0200 Subject: [PATCH] remove console.log --- index.js | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/index.js b/index.js index 860abac..ae9058d 100644 --- a/index.js +++ b/index.js @@ -1,28 +1,27 @@ function getImageChilds(parent, options) { - console.log(options) - for (let child in parent.children) { - if ( - parent.children[child].children && - parent.children[child].children.length > 0 - ) { - getImageChilds(parent.children[child], options); - } + for (let child in parent.children) { + if ( + parent.children[child].children && + parent.children[child].children.length > 0 + ) { + getImageChilds(parent.children[child], options); + } - if (parent.children[child].type === "image") { - const data = (parent.children[child].data = {}); + if (parent.children[child].type === "image") { + const data = (parent.children[child].data = {}); - const props = (data.hProperties = {}); - props.width = options.width ? options.width : "100%"; - } + const props = (data.hProperties = {}); + props.width = options.width ? options.width : "100%"; } } +} - function imageSize(options={}) { - return (node) => { - for (let child in node.children) { - getImageChilds(node.children[child], options); - } - }; - } +function imageSize(options = {}) { + return (node) => { + for (let child in node.children) { + getImageChilds(node.children[child], options); + } + }; +} - module.exports = imageSize \ No newline at end of file +module.exports = imageSize;