Add some javadoc to update

This commit is contained in:
Aaron Jensen 2015-08-01 23:38:27 -07:00
parent 54137398ea
commit f199cd335a

View File

@ -39,6 +39,10 @@ function updateArray(updates, obj) {
* Or with a function:
* update({ foo: x => (x + 1) }, { foo: 2 });
* // => { foo: 3 }
*
* @param {Object|Function} updates
* @param {Object|Array} object to update
* @return {Object|Array} new object with modifications
*/
function update(updates, obj) {
if (typeof updates === 'function') {