/* to run: babel-node albums.js */

global.fetch = require('node-fetch');

import { searchAlbums } from '../src/index';

const albums = searchAlbums('Incubus');

albums.then(data => data.albums.items.map(item => console.log(item.name)));

/* to run: babel-node albums.js */

global.fetch = require('node-fetch');

import { searchAlbums } from '../src/main';

const albums = searchAlbums('Incubus');

albums.then(data => data.albums.items.map(item => console.log(item.name)));

--- 
+++ 
@@ -2,7 +2,7 @@
 
 global.fetch = require('node-fetch');
 
-import { searchAlbums } from '../src/main';
+import { searchAlbums } from '../src/index';
 
 const albums = searchAlbums('Incubus');
 
Change to import from index instead of main
