To Window
Adds key to window object if is browser.

@param key the key or object to add to the window object.
@param val the corresponding value to add to window object.
@param exclude string or array of keys to exclude.
775187
function toWindow(key, val, exclude) {
    /* istanbul ignore if */
    if (!is_1.isBrowser())
        return;
    exclude = toArray(exclude);
    var _keys, i;
    // key/val was passed.
    if (is_1.isString(key)) {
        if (!is_1.isPlainObject(val)) {
            window[key] = val;
        }
        else {
            var obj = {};
            _keys = array_1.keys(val);
            i = _keys.length;
            while (i--) {
                if (!array_1.contains(exclude, _keys[i]))
                    obj[_keys[i]] = val[_keys[i]];
            }
            window[key] = obj;
        }
    }
    // object passed to key.
    else if (is_1.isPlainObject(key)) {
        _keys = array_1.keys(key);
        i = _keys.length;
        while (i--) {
            if (!array_1.contains(exclude, _keys[i]))
                window[_keys[i]] = key[_keys[i]];
        }
    }
}
493815
function(key, val) {
		var self   = this,
			s      = window.localStorage,
			oldkey = 'elfinder-'+(key || '')+this.id, // old key of elFinder < 2.1.6
			prefix = window.location.pathname+'-elfinder-',
			suffix = this.id,
			clrs   = [],
			retval, oldval, t, precnt, sufcnt;

		// reset this node data
		if (typeof(key) === 'undefined') {
			precnt = prefix.length;
			sufcnt = suffix.length * -1;
			$.each(s, function(key) {
				if (key.substr(0, precnt) === prefix && key.substr(sufcnt) === suffix) {
					clrs.push(key);
				}
			});
			$.each(clrs, function(i, key) {
				s.removeItem(key);
			});
			return true;
		}
		
		// new key of elFinder >= 2.1.6
		key = prefix+key+suffix;
		
		if (val === null) {
			return s.removeItem(key);
		}
		
		if (val === void(0) && !(retval = s.getItem(key)) && (oldval = s.getItem(oldkey))) {
			val = oldval;
			s.removeItem(oldkey);
		}
		
		if (val !== void(0)) {
			t = typeof val;
			if (t !== 'string' && t !== 'number') {
				val = JSON.stringify(val);
			}
			try {
				s.setItem(key, val);
			} catch (e) {
				try {
					s.clear();
					s.setItem(key, val);
				} catch (e) {
					self.debug('error', e.toString());
				}
			}
			retval = s.getItem(key);
		}

		if (retval && (retval.substr(0,1) === '{' || retval.substr(0,1) === '[')) {
			try {
				return JSON.parse(retval);
			} catch(e) {}
		}
		return retval;
	}
861746
static String mapEntryToString(Object key, Object val) {
        final String k, v;
        final int klen, vlen;
        final char[] chars =
            new char[(klen = (k = objectToString(key)).length()) +
                     (vlen = (v = objectToString(val)).length()) + 1];
        k.getChars(0, klen, chars, 0);
        chars[klen] = '=';
        v.getChars(0, vlen, chars, klen + 1);
        return new String(chars);
    }
906995
public synchronized StorableProperties put(String key, Object val) {
        if (!key.equals(toLowerCase(key)))
            throw new IllegalArgumentException("Do not use upper case keys (" + key + ") for StorableProperties since 0.7");

        map.put(key, val.toString());
        return this;
    }
816517
public void addExclude(String exclude) {

        exclude = normalizePath(exclude);
        m_excludes.add(exclude);
        m_allPaths.add(exclude);
    }
731447
@Override
	public void setOutputOption(String key, String val) {
		setOutputOption(BlastOutputParameterEnum.valueOf(key), val);
	}
104924
public void addNextValue(Object val) {
    long newVal = Long.parseLong(val.toString());
    if (this.maxVal < newVal) {
      this.maxVal = newVal;
    }
  }
462949
private static void appendKeyValue(StringBuffer str, String key, String value) {

        str.append(key);
        if (value == IS_USED) {
            str.append(";");
        } else {
            str.append("=(");
            str.append(value);
            str.append(");");
        }
    }
507675
public <T> void put(Key<T> key, T value) {
    Preconditions.checkNotNull(key, "key");
    Preconditions.checkNotNull(value, "value");
    maybeExpand();
    name(size, key.asciiName());
    value(size, key.toBytes(value));
    size++;
  }
954684
private void addValuedKey(final StringBuffer sb, String key, String fullKey) {

		sb.append(getJsonKey(key)).append(":").append(FUNC)
				.append(JavascriptStringUtil.quote(bundleValues.get(fullKey).toString()));
	}
710775
@Override
	public void removeByKey(String key) {
		for (CPDefinitionOptionValueRel cpDefinitionOptionValueRel : findByKey(
				key, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpDefinitionOptionValueRel);
		}
	}
104
public void setData(String key, String value) {
        QName qn = new QName("data-" + key);
        this.getOtherAttributes().put(qn, value);
    }
1311664
@Override
    public KVStore putValue(String key, Object val) {
        put(key, ValueObject.of(val));
        return this;
    }
1146364
public boolean remove     ( Object key,Object val ) {
    return Objects.equals(putIfMatch( key,TOMBSTONE, val ), val);
  }
391733
public void addNextValue(Object val) {
    String newVal = val.toString();
    if (this.maxVal == null || this.maxVal.compareTo(newVal) < 0) {
      this.maxVal = newVal;
    }
  }
291629
function (key, val) {
    var opts = lazy.clone(this.options);
    var View = this.get('View');
    val.path = val.path || key;
    key = val.key = this.renameKey(key);
    this.setItem(key, (this[key] = new View(val, opts)));
    return this;
  }
357108
function mixin( key, val ){

        if ( typeof key === 'object' ){
            proto = extend(proto, key);
            proto.type = type;
            return;
        }

        if ( key !== 'type' && Physics.util.isFunction( val ) ){
            proto[ key ] = val;
        }
    }