Is there any utility to apply delta object of Y.Array Event to javascript array. For example I get this delta object in Y.Array observer:
[
{
"retain": 1
},
{
"insert": [
{
"copytext": "Hello world",
"id": "1104",
}
]
},
{
"retain": 1
},
{
"delete": 1
}
]
So we have an array where we leave one element, then insert new, then leave one and then delete one. This is a sequence of actions that should be applied to a regular JavaScript array. What is the best way to do that?