From 971cbb69b5fd1e81572ae97e4e194dced87d4aef Mon Sep 17 00:00:00 2001 From: ZerozAndOnes <20877823+ZerozAndOnes@users.noreply.github.com> Date: Thu, 14 Jul 2022 16:50:42 +0300 Subject: [PATCH] Typo fixes. Partials of https://github.com/marcbachmann/node-html-pdf/pull/532/files and https://github.com/marcbachmann/node-html-pdf/pull/513 --- README.md | 2 +- lib/pdf.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index db5c23f..c9020e9 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ pdf.create(html, options).toFile('./businesscard.pdf', function(err, res) { ```js var pdf = require('html-pdf'); -pdf.create(html).toFile([filepath, ]function(err, res){ +pdf.create(html).toFile([filepath, ], function(err, res){ console.log(res.filename); }); diff --git a/lib/pdf.js b/lib/pdf.js index afb8791..af5cac5 100644 --- a/lib/pdf.js +++ b/lib/pdf.js @@ -75,7 +75,7 @@ PDF.prototype.toStream = function PdfToStream (callback) { } PDF.prototype.toFile = function PdfToFile (filename, callback) { - assert(arguments.length > 0, 'html-pdf: The method .toFile([filename, ]callback) requires a callback.') + assert(arguments.length > 0, 'html-pdf: The method .toFile([filename, ], callback) requires a callback.') if (filename instanceof Function) { callback = filename filename = undefined