The JSMA slice provides functionality for handling a slice
What can JSMA slice do for me?You could use the JSMA slice to edit a slice |
Here is an example on how to write data to a JSMA slice:
... var text = request.parameter("text"); slice.commit(text); ... |
Here is an example on how to read data from a JSMA slice:
... slice.name ... |
The JSMA slice provides the following methods:
Commits the slice with the given message
... var message = 'this slice is finished'; slice.commit(message); ... |
The message for the commit of the slice.
Deletes the slice
... slice.delete(); ... |
Returns the id of the slice
... slice.id ... |
Returns the name of the slice
... slice.name ... |
Returns the true if the slice is a private slice
... if (slice.private === true) { // do something here } ... |
Sets the slice to the current one
... var slice = slices.create({ name: message }); slice.switch(); ... |
Updates the slice
... var message = 'this slice is updated'; slice.update({description : message}); ... |
The options for the update of the slice.