<commit_before>import * as _ from 'lodash';
import { Injectable } from '@angular/core';
import { Http, Headers } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { MdSidenav } from '@angular/material';

import 'rxjs/add/observable/of';
import 'rxjs/add/observable/throw';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';


@Injectable()
export class PipSidenavService {
    public _sidenav: MdSidenav;

    public constructor() { }

    public get sidenav(): MdSidenav {
        return this._sidenav;
    }

    public set sidenav(sidenav: MdSidenav) {
        this._sidenav = sidenav;
    }

    public toggleNav(sidenav: MdSidenav = this._sidenav) {
        if (sidenav) {
            sidenav.toggle();
        } else { console.log('Sidenav not found'); }
    }

    public openNav(sidenav: MdSidenav = this._sidenav) {
        if (sidenav) {
            sidenav.open();
        } else {
            console.log('Sidenav not found');
        }

    }
}<commit_msg>[Sidenav service] add new functions<commit_after>import * as _ from 'lodash';
import { Injectable } from '@angular/core';
import { Http, Headers } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { MdSidenav } from '@angular/material';

import 'rxjs/add/observable/of';
import 'rxjs/add/observable/throw';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';


@Injectable()
export class PipSidenavService {
    public _sidenav: MdSidenav;

    public constructor() { }

    public get sidenav(): MdSidenav {
        return this._sidenav;
    }

    public set sidenav(sidenav: MdSidenav) {
        this._sidenav = sidenav;
    }

    public toggleNav(sidenav: MdSidenav = this._sidenav) {
        if (sidenav) {
            sidenav.toggle();
        } else { console.log('Sidenav not found'); }
    }

    public openNav(sidenav: MdSidenav = this._sidenav) {
        if (sidenav) {
            sidenav.open();
        } else {
            console.log('Sidenav not found');
        }

    }

    public closeNav(sidenav: MdSidenav = this._sidenav) {
        if (sidenav) {
            sidenav.close();
        } else {
            console.log('Sidenav not found');
        }
    }

    public changeStateNav(sidenav: MdSidenav = this._sidenav) {
        if (sidenav) {

        } else {
            console.log('Sidenav not found');
        }
    }
}
{'fraction_non_alphanumeric': 0.12669322709163347, 'fraction_numerical': 0.0, 'mean_word_length': 2.587142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3208554', 'n_tokens_mistral': 865, 'n_tokens_neox': 829, 'n_words': 177}