<commit_before>var through = require('through2')
  , fs = require('fs')
  , p = require('path')
  , rm = require('rimraf')
  , mkdirp = require('mkdirp')
  , gutil = require('gulp-util')
  , PluginError = gutil.PluginError
  , File = gutil.File

  , PLUGIN_NAME = 'gulp-sym'

// Plugin level function(dealing with files)
function gulpSymlink(dest, options) {

  options = typeof options == 'object' ? options : {}
  options.force = options.force === undefined ? false : options.force

  if (!dest) {
    throw new PluginError(PLUGIN_NAME, "Missing destination link")
  }

  var stream = through.obj(function(source, enc, callback) {

    var self = this

    //resolving absolute path from source
    source.path = p.resolve(source.cwd, source.path)

    //if dest is a function simply call it
    dest = typeof dest == 'function' ? dest(source) : dest

    //is the previous result a File instance ?
    dest = dest instanceof File ? dest : new File({path: dest})

    //resolving absolute path from dest
    dest.path = p.resolve(dest.cwd, dest.path)

    //check if the destination path exists
    var exists = fs.existsSync(dest.path)

    //No force option, we can't override! 
    if(exists && !options.force) {
      this.emit('error', new PluginError(PLUGIN_NAME, 'Destination file exists - use force option to replace', dest))
      this.push(source)
      return callback()

    } else {
<commit_msg>take array of destinations as parameters<commit_after>var through = require('through2')
  , fs = require('fs')
  , p = require('path')
  , rm = require('rimraf')
  , mkdirp = require('mkdirp')
  , gutil = require('gulp-util')
  , PluginError = gutil.PluginError
  , File = gutil.File

  , PLUGIN_NAME = 'gulp-sym'

// Plugin level function(dealing with files)
function gulpSymlink(dest, options) {

  options = typeof options == 'object' ? options : {}
  options.force = options.force === undefined ? false : options.force

  if (!dest) {
    throw new PluginError(PLUGIN_NAME, "Missing destination link")
  }

  if(dest instanceof Array) {
    //copy array because we'll shift values
    var destinations = dest.slice()
  }

  var stream = through.obj(function(source, enc, callback) {

    var self = this

    //resolving absolute path from source
    source.path = p.resolve(source.cwd, source.path)

    //Array of destinations is passed
    dest = destinations !== undefined ? destinations.shift() : dest

    //if dest is a function simply call it
    dest = typeof dest == 'function' ? dest(source) : dest

    //is the previous result a File instance ?
    dest = dest instanceof File ? dest : new File({path: dest})

    //resolving absolute path from dest
    dest.path = p.resolve(dest.cwd, dest.path)

    //check if the destination path exists
    var exists = fs.existsSync(dest.path)

    //No force option, we can't override! 
    if(exists && !options.force) {
      this.emit('error', new PluginError(PLUGIN_NAME, 'Destination file exists - use force option to replace', dest))
      this.push(source)
      return callback()

    } else {

{'fraction_non_alphanumeric': 0.12186379928315412, 'fraction_numerical': 0.0006516780710329097, 'mean_word_length': 3.1997264021887823, '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': '1281134', 'n_tokens_mistral': 945, 'n_tokens_neox': 900, 'n_words': 289}