From 98dac6e711d25d3d571620d9481ad3163c78ca6e Mon Sep 17 00:00:00 2001 From: Adam Harris Date: Tue, 28 Jul 2015 17:20:28 -0600 Subject: [PATCH] Fix first example code * Fix the function name to base64encoder instead of base64encode * Add options parameter * Remove trailing whitespace --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 23e89f6..3967f99 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,15 @@ Require the library in your .js file `var base64 = require('node-base64-image');` #### Download and encode an image -``` -var options = {string: true} - -base64.base64encode('www.someurl.com/image.jpg', function (err, image) { - if (err) { console.log(err); } - console.log(image); -}); +``` +var options = {string: true}; + +base64.base64encoder('www.someurl.com/image.jpg', options, function (err, image) { + if (err) { + console.log(err); + } + console.log(image); +}); ``` #### Encode a local image