/* 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)));

/* 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)));

Change to import from index instead of main
Change to import from index instead of main
