analytics.js
function set(key, val){
  return null == val
    ? storage.removeItem(key)
    : storage.setItem(key, JSON.stringify(val));
}
function set(key, val){
  return null == val
    ? storage.removeItem(key)
    : storage.setItem(key, JSON.stringify(val));
}
function set ( key , val ) { return null == val ? storage . removeItem ( key ) : storage . setItem ( key , JSON . stringify ( val ) ) ; }
Set `key` to `val`.

@param {String} key
@param {Mixed} val
Set key to val .