<commit_before>d3plus.method.draw = {
  "accepted": [ undefined ],
  "first": true,
  "frozen": false,
  "update": true,
  "value": function ( vars ) {

    if ( !vars.container.value ) {

      var str = vars.format.locale.value.warning.setContainer
      d3plus.console.warning(str)

    }
    else if ( d3.select(vars.container.value).empty() ) {

      var str = vars.format.locale.value.warning.noContainer
      d3plus.console.warning(d3plus.util.format(str,vars.container))

    }
    else {

      d3.select(vars.container.value).call(vars.self)

    }

  }
}<commit_msg>passing a function to .draw() now enables a callback for each draw<commit_after>d3plus.method.draw = {
  "accepted": [ undefined , Function ],
  "first": true,
  "frozen": false,
  "process": function ( value ) {

    if ( this.initialized === false ) {
      this.initialized = true
      return value
    }

    var vars    = this.getVars()
      , changes = "history" in vars ? vars.history.chain : []

    if ( value === undefined && typeof this.value === "function" ) {
      value = this.value
    }

    if ( vars.container.value === false ) {

      var str = vars.format.locale.value.warning.setContainer
      d3plus.console.warning(str)

    }
    else if ( vars.container.value.empty() ) {
      console.log(vars.container.value.node())
      var str = vars.format.locale.value.warning.noContainer
      d3plus.console.warning(d3plus.util.format(str,vars.container.value))

    }
    else {

      vars.container.value.call(vars.self)

    }

    if ( typeof value === "function" && changes.length ) {

      var changesObject = {}
      changes.forEach(function(c){
        var method = c.method
        delete c.method
        changesObject[method] = c
      })

      value(changesObject)

      vars.history.chain = []

    }

    return value

  },
  "update": true,
  "value": undefined
}
{'fraction_non_alphanumeric': 0.14164456233421752, 'fraction_numerical': 0.005305039787798408, 'mean_word_length': 2.4797047970479706, 'pattern_counts': {'":': 11, '<': 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': '85799', 'n_tokens_mistral': 614, 'n_tokens_neox': 589, 'n_words': 112}