<commit_before>/**
 * Grunt Mustacher
 * https://github.com/malas34/grunt-mustacher
 *
 * Copyright (c) 2014 <NAME>
 * Licensed under the MIT license.
 *
 * HANDLEBARS
 * @see http://handlebarsjs.com/
 *
 */
/*jslint indent: 4 */
/*global module, require */
(function () {

    'use strict';

    var LivereloadHelper,
        lodash = require('lodash'),
        Utils = require('./../task-utils'),
        Handlebars = require('handlebars');

    LivereloadHelper = function () {};

    LivereloadHelper.prototype.register = function () {
        Handlebars.registerHelper('$livereload', this.render.bind(this));
    };

    LivereloadHelper.prototype.render = function (port, options) {
        var result, args = Utils.hasOptions(arguments);
        if (!args || args.length < 1) {
            throw new Error('Livereload Helper arguments is missing');
        }

        if (lodash.isObject(port) && args.length < 2) {
            options = port;
            port = 1337;
        }
        port = parseFloat(port);

        // if(Grunt.option('debug')){
        result = '<script src="http://localhost:' + port + '/livereload.js"></script>';
        // }
        return new Handlebars.SafeString(result);

    };<commit_msg>update livereload<commit_after>/**
 * Grunt Mustacher
 * https://github.com/malas34/grunt-mustacher
 *
 * Copyright (c) 2014 <NAME>
 * Licensed under the MIT license.
 *
 * HANDLEBARS
 * @see http://handlebarsjs.com/
 *
 */
/*jslint indent: 4 */
/*global module, require */
(function () {

    'use strict';

    var LivereloadHelper,
        lodash = require('lodash'),
        Utils = require('./../task-utils'),
        Handlebars = require('handlebars');

    LivereloadHelper = function () {};

    LivereloadHelper.prototype.register = function () {
        Handlebars.registerHelper('$livereload', this.render.bind(this));
    };

    LivereloadHelper.prototype.render = function (port, options) {
        var result, args = Utils.hasOptions(arguments);
        if (!args || args.length < 1) {
            throw new Error('Livereload Helper arguments is missing');
        }

        if (lodash.isObject(port) && args.length < 2) {
            options = port;
            port = 1337;
        }
        port = parseFloat(port);

        // if(Grunt.option('debug')){
        result = '<script src="http://localhost:' + port + '/livereload.js?snipver=1"></script>';
        // }
        return new Handlebars.SafeString(result);

    };
{'fraction_non_alphanumeric': 0.15465587044534412, 'fraction_numerical': 0.010931174089068825, 'mean_word_length': 2.4224376731301938, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 9, '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': '1056257', 'n_tokens_mistral': 770, 'n_tokens_neox': 704, 'n_words': 155}