Interface: RSModule
Defined in: remotestorage.ts:123
Represents a data module
Example
js
{
name: 'examples',
builder: function(privateClient, publicClient) {
return {
exports: {
addItem(item): function() {
// Generate a random ID/path
const path = [...Array(10)].map(() => String.fromCharCode(Math.floor(Math.random() * 95) + 32)).join('');
// Store the object, and ensure it conforms to the JSON Schema
// type `example-item`
privateClient.storeObject('example-item', path, item);
}
}
}
}
}Properties
builder
builder: (
privateClient,publicClient) =>object
Defined in: remotestorage.ts:131
A module builder function, which defines the actual module
Parameters
privateClient
publicClient
Returns
object
exports
exports:
object
Index Signature
[key: string]: any
name
name:
string
Defined in: remotestorage.ts:127
The module's name, which is also the category (i.e. base folder) for document URLs on the remote storage