function addSongToPlaylist(song, playlist) {
		/*
  	Ensures we have a songs array to push to. This is step 1.
  */
		if (_config2.default.songs == undefined) {
			_config2.default.songs = [];
		}

		_config2.default.songs.push(song);

		var songIndex = _config2.default.songs.length - 1;

		/*
  	Ensures the playlist is valid to push the song on to.
  */
		if (_config2.default.playlists[playlist] != undefined) {
			_config2.default.playlists[playlist].push(songIndex);

			return _config2.default.playlists[playlist].length - 1;
		} else {
			return null;
		}
	}
/**
  * Adds a song to a playlist. This will allow Amplitude to play the song in the
  * playlist
  *
  * Public Accessor: Amplitude.addSongToPlaylist( song_json, playlist_key )
  *
  * @access public
  * @param {object} song 			- JSON representation of a song.
  * @param {string} playlist		- Playlist we are adding the song to.
  * @returns {mixed} New index of song in playlist or null if no playlist exists
  */
Adds a song to a playlist. This will allow Amplitude to play the song in the
playlist



@access public
@param {object} song                        - JSON representation of a song.
@param {string} playlist            - Playlist we are adding the song to.
@returns {mixed} New index of song in playlist or null if no playlist exists
Adds a song to a playlist . This will allow Amplitude to play the song in the playlist @access public @param { object } song - JSON representation of a song . @param { string } playlist - Playlist we are adding the song to . @returns { mixed } New index of song in playlist or null if no playlist exists
function addSongToPlaylist(song, playlist) {
		if (_config2.default.songs == undefined) {
			_config2.default.songs = [];
		}
		_config2.default.songs.push(song);
		var songIndex = _config2.default.songs.length - 1;
		if (_config2.default.playlists[playlist] != undefined) {
			_config2.default.playlists[playlist].push(songIndex);
			return _config2.default.playlists[playlist].length - 1;
		} else {
			return null;
		}
	}
function addSongToPlaylist ( song , playlist ) { if ( _config2 . default . songs == undefined ) { _config2 . default . songs = [ ] ; } _config2 . default . songs . push ( song ) ; var songIndex = _config2 . default . songs . length - 1 ; if ( _config2 . default . playlists [ playlist ] != undefined ) { _config2 . default . playlists [ playlist ] . push ( songIndex ) ; return _config2 . default . playlists [ playlist ] . length - 1 ; } else { return null ; } }
Adds a song to a playlist.
Adds a song to a playlist .
/*
  	Ensures we have a songs array to push to. This is step 1.
  */ /*
  	Ensures the playlist is valid to push the song on to.
  */