IPC
IPCRecord object
Property
Type
Description
record.pop()
import { IPC } from '@empathize/framework';
IPC.read().then((records) => {
records.forEach((record) => {
if (record.data == 'test-data')
record.pop(); // Otherwise this record will remain in IPC.read() output
});
});record.get()
import { IPC } from '@empathize/framework';
IPC.read().then((records) => {
records.forEach((record) => {
if (record.data == 'test-data')
{
// record.pop() method returns this record after its deletion
// and we can call its .get() method after that
const recordData = record.pop().get();
// It will output { id: '...', time: '...', data: '...' }
console.log(recordData);
}
});
});IPC class
IPC.file
IPC.read()
IPC.write(data)
IPC.remove(record)
IPC.purge()
Last updated