code: function freezer(deep, o) {
    if (typeof o !== 'object' ||
        o === null ||
        o instanceof Monkey)
      return;
  
    Object.freeze(o);
  
    if (!deep)
      return;
  
    if (Array.isArray(o)) {
  
      // Iterating through the elements
      let i,
          l;
  
      for (i = 0, l = o.length; i < l; i++)
        deepFreeze(o[i]);
    }
    else {
      let p,
          k;
  
      for (k in o) {
        if (type.lazyGetter(o, k))
          continue;
  
        p = o[k];
  
        if (!p ||
            !hasOwnProp.call(o, k) ||
            typeof p !== 'object' ||
            Object.isFrozen(p))
          continue;
  
        deepFreeze(p);
      }
    }
  }
docs: Function freezing the given variable if possible.
  
  @param  {boolean} deep - Should we recursively freeze the given objects?
  @param  {object}  o    - The variable to freeze.
  @return {object}    - The merged object.