creates a copy of an item at the defined position
copy(id: (string | number) | (string | number)[], index: number, target?: object): (string | number) | (string | number)[];
Parameters:id: (string | number) | (string | number)[]
- the id of an item or an array with ids of items to copyindex: number
- the index to create a copy attarget: object
- optional, the target data collection objectThe item's id or an array with ids of items.
Example
component.data.copy("4",5); // copies the item with id:4 to the position with index 5
Related sample: Data. Copy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4