Implement unshift to y-arrays
This commit is contained in:
parent
9fc18d5ce0
commit
8bb52a485a
@ -121,6 +121,15 @@ export class YArray extends AbstractType {
|
||||
this.insert(this.length, content)
|
||||
}
|
||||
|
||||
/**
|
||||
* Preppends content to this YArray.
|
||||
*
|
||||
* @param {Array<T>} content Array of content to preppend.
|
||||
*/
|
||||
unshift (content) {
|
||||
this.insert(0, content)
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes elements starting from an index.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user