Add some javadoc to update

main
Aaron Jensen 2015-08-01 23:38:27 -07:00
parent 54137398ea
commit f199cd335a
1 changed files with 4 additions and 0 deletions

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') {