<commit_before>export class FriendList {
    Friends = [
        {
            firstName: 'Jackey1',
            lastName: 'Li',
            age: 25
        }
    ];

    get() {
        return this.Friends;
    }

    add(value:Object) {
        this.Friends.push(value);
    }
}<commit_msg>basic CRUD practise<commit_after>export class FriendList {
    Friends = [
        {
            id: 1,
            firstName: 'Jackey1',
            lastName: 'Li',
            age: 25
        }
    ];

    get() {
        return this.Friends;
    }

    add(value:Object) {
        this.Friends.push(value);
    }

    getNextFriendId() {
        var result = 1, len = this.Friends.length;
        if (!len) {
            return result;
        }
        for (var i = 0; i < len; i++) {
            var friend = this.Friends[i];
            if (friend.id > result) {
                result = friend.id;
            }
        }
        return result + 1;
    }

    delete(friend) {
        var len = this.Friends.length,
            index = this.Friends.indexOf(friend);
        if (index !== -1) {
            this.Friends.splice(index, 1);
        }
    }
}
{'fraction_non_alphanumeric': 0.12489158716392021, 'fraction_numerical': 0.010407632263660017, 'mean_word_length': 1.2495126705653021, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, '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': '5687564', 'n_tokens_mistral': 375, 'n_tokens_neox': 357, 'n_words': 73}