<commit_before>var got = require('got');
window.$ = window.jQuery = require('./jquery.min.js');

$("#songForm").submit(function (event) {
    alert("Handler for .submit() called.");
    event.preventDefault();
});


//got('https://itunes.apple.com/search?term=rocket%20man', function (err, data, res) {
//    document.write(data);
//});<commit_msg>Get artist name from song<commit_after>var got = require('got');
window.$ = window.jQuery = require('./jquery.min.js');

$("#songForm").submit(function (event) {
    itunesFetch($('#songName').val());
    event.preventDefault();
});


function itunesFetch(data) {
 got('https://itunes.apple.com/search?term=' + data, {json:true}, function (err, data, res) {
    document.write(data.results[0].artistName);
});
}

{'fraction_non_alphanumeric': 0.225, 'fraction_numerical': 0.003947368421052632, 'mean_word_length': 4.8538461538461535, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2901654', 'n_tokens_mistral': 247, 'n_tokens_neox': 244, 'n_words': 43}