Bulk save functionality (setItems method) + other minor fixes

No new tests, existing tests work
Oh, sorry, I wasn't very clear. I would prefer the code not have any one-line functions, so:

function() {
code() 
} 

Instead of

function() {code() } 

Sorry for the bad format, I'm on my phone right now. 
--
tofumatt (Sent from mobile)

On 8 December 2014 17:30:31 GMT-05:00, lu4 <notifications@github.com> wrote:
>> +                                        t.executeSql(query,
>[keyFn(item, index), value], undefined, function(error) { resolving =
>false; reject(error); });
>> +                                    }
>> +                                });
>> +                            })(items[index], index);
>> +                        }
>> +                    } else {
>> +                        // According to:
>> +                        //
>http://stackoverflow.com/questions/10031605/optimizing-websql-local-database-population/10031717#10031717
>> +                        for (var key in items) {
>> +                            if (items.hasOwnProperty(key)) {
>> +                                (function(item, key) { // This is
>required due to async nature of _serialize
>> +                                    _serialize(valueFn(item, key),
>function(value, error) {
>> +                                        if (error) {
>> +                                            reject(error);
>> +                                        } else {
>> +                                            t.executeSql(query,
>[keyFn(item, key), value], undefined, function(error) { resolving =
>false; reject(error); });
>
>not sure I understand this one, what do you mean by "new line for the
>contents of the function"
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/mozilla/localForage/pull/318/files#r21492008