Skip to content

Commit

Permalink
Fix first example code
Browse files Browse the repository at this point in the history
* Fix the function name to base64encoder instead of base64encode
* Add options parameter
* Remove trailing whitespace
  • Loading branch information
Adam Harris authored and riyadhalnur committed Oct 7, 2015
1 parent 47cb1dd commit 98dac6e
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 98dac6e

Please sign in to comment.