From 33f717e2de267fafd22b9af3745240cf7051043f Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Sun, 6 Oct 2019 17:48:10 +0200 Subject: Refactor by moving template render on top --- lib/template.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/template.js b/lib/template.js index ce05473..c1446a9 100644 --- a/lib/template.js +++ b/lib/template.js @@ -29,7 +29,10 @@ function fmt(words, maxLine, glue1, glue2) { } -function render(src, pkg) { +function render({ + src, + pkg +}) { const deps = pkg.dependencies || {}; const devDeps = pkg.devDependencies || {}; const npmInputs = Object.keys({...deps, @@ -86,4 +89,4 @@ ${source} `; } -module.exports = render; +module.exports = render; \ No newline at end of file -- cgit v1.2.3