<commit_before>'use strict'

module.exports = function observBind (observ1, observ2) {
  var transaction = false
  var unlisten1 = observ1(update(observ2.set.bind(observ2)))
  var unlisten2 = observ2(update(observ1.set.bind(observ1)))

  return unlisten

  function update (setter) {
    return function updateBound (value) {
      if (transaction) return
      transaction = true
      setter(value)
      transaction = false<commit_msg>Lazily evaluate observ setter and remove bind<commit_after>'use strict'

module.exports = function observBind (observ1, observ2) {
  var transaction = false
  var unlisten1 = observ1(update(observ2))
  var unlisten2 = observ2(update(observ1))

  return unlisten

  function update (destination) {
    return function updateBound (value) {
      if (transaction) return
      transaction = true
      destination.set(value)
      transaction = false
{'fraction_non_alphanumeric': 0.08690744920993228, 'fraction_numerical': 0.020316027088036117, 'mean_word_length': 3.9831460674157304, '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': '4748187', 'n_tokens_mistral': 252, 'n_tokens_neox': 247, 'n_words': 71}