<commit_before>/*
 * gulp-svg-mix
 * Licensed under the MIT license.
 */

"use strict";

var fs          = require('fs');
var through     = require('through2');
var gutil       = require('gulp-util');
var PluginError = gutil.PluginError;

function icon(name, options) {

    var options = options || {};
    var size    = options.size ? ' svg-icon--' + options.size : '';
    var classes = 'svg-icon svg-icon--' + name + size + ' ' + (options.class || '');
    classes     = classes.trim();

    var icon = '<svg class="svg-icon__link"><use xlink:href="#' + name + '" /></svg>';
    var html =  '<' + options.tag + ' class="' + classes + '">' + wrapSpinner(icon, classes) + '</' + options.tag + '>';

    return html;
}<commit_msg>Тег иконки теперь НЕОБЯЗАТЕЛЕН, и по умолчанию DIV а не undefined :)<commit_after>/*
 * gulp-svg-mix
 * Licensed under the MIT license.
 */

"use strict";

var fs          = require('fs');
var through     = require('through2');
var gutil       = require('gulp-util');
var PluginError = gutil.PluginError;

function icon(name, options) {

    var options = options || {};
    var size    = options.size ? ' svg-icon--' + options.size : '';
    var classes = 'svg-icon svg-icon--' + name + size + ' ' + (options.class || '');

    classes     = classes.trim();

    options.tag = (options.tag == 'undefined') ? 'div' : options.tag;

    var icon = '<svg class="svg-icon__link"><use xlink:href="#' + name + '" /></svg>';
    var html =  '<' + options.tag + ' class="' + classes + '">' + wrapSpinner(icon, classes) + '</' + options.tag + '>';

    return html;
}
{'fraction_non_alphanumeric': 0.19634990560100693, 'fraction_numerical': 0.0012586532410320957, 'mean_word_length': 2.8592233009708736, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3803605', 'n_tokens_mistral': 540, 'n_tokens_neox': 530, 'n_words': 132}