An open API service indexing awesome lists of open source software.

https://github.com/yakovenkodenis/node-remote-base64

Fetch remote data to base64 format using Promises.
https://github.com/yakovenkodenis/node-remote-base64

base64 base64image fetch node nodejs

Last synced: 3 months ago
JSON representation

Fetch remote data to base64 format using Promises.

Awesome Lists containing this project

README

          

# Remote Base64 [![Build Status](https://travis-ci.org/yakovenkodenis/node-remote-base64.svg?branch=master)](https://travis-ci.org/yakovenkodenis/node-remote-base64)
======

## Installation

`npm install --save node-remote-base64`

## Usage

#### ES5
```javascript
const remoteBase64 = require('node-remote-base64');

const getBase64 = () =>
remoteBase65('http://placehold.it/100x100')
.then(b64data => console.log(b64data))
.catch(err => console.log(err));
```

#### Babel ES7 (Async/Await)
```javascript
import remoteBase64 from 'node-remote-base64';

const getBase64 = async () => {
const b64data = await remoteBase65('http://placehold.it/100x100');
console.log(b64data);
}
```

## Tests

`npm test`

## Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.