lib/jsonsp/parser.js
function addToContainer(container, key, val) {
  if (container instanceof Array) {
    container.push(val);
  } else if (container instanceof Object) {
    container[key] = val;
  }
}
function addToContainer(container, key, val) {
  if (container instanceof Array) {
    container.push(val);
  } else if (container instanceof Object) {
    container[key] = val;
  }
}
function addToContainer ( container , key , val ) { if ( container instanceof Array ) { container . push ( val ) ; } else if ( container instanceof Object ) { container [ key ] = val ; } }
Add `val` to `container`.

If `container` is an array, `val` will be appended.  Otherwise, if
`container` is an object, `val` will be set as the value of `key`.

@param {Object|Array} container
@param {String} key
@param {Mixed} val
@api private
Add val to container .