Closed bedeoverend closed 7 years ago
This changes the behaviour of set to overwrite what's currently in the buffer, rather than overwriting it. This means doing the following:
set
Simpla.set('/title', { type: 'Text', data: { text: 'Hello World' }, }); // Some time later.... Simpla.set('/title', { data: { text: 'Hi there' }, }); Simpla.get('/title').then(response => console.log(response));
would log:
{ type: 'Text', data: { text: 'Hi there' }, }
i.e. the type was retained from the first set.
type
This particularly means that the createdAt and updatedAt properties set by the API on save won't be lost on subsequent local sets.
createdAt
updatedAt
This changes the behaviour of
set
to overwrite what's currently in the buffer, rather than overwriting it. This means doing the following:would log:
i.e. the
type
was retained from the first set.This particularly means that the
createdAt
andupdatedAt
properties set by the API on save won't be lost on subsequent local sets.