-
Notifications
You must be signed in to change notification settings - Fork 2
alter
Peter Naydenov edited this page Dec 19, 2017
·
2 revisions
Will change property names of the current-data to fit the required template placeholders.
{
do : 'alter'
, data : changes
, select ?: items
}
-
items: string | number | Array < string | number >. Represent elements in the list. There are few predefined values: 'first','last','all'. Use number to define element from start to end or (-number) from end to start. Missing selection param is equal to:
select: ['all']
- changes: { before : after }, where before is actual property name that will be renamed to after.
{ do: 'alter', data: {'user':'text'} }
If current-data has item { user: 'Peter' }, item will be converted to {text: Peter} in order to fit template requirements - existing template placeholders.