copy - PeterNaydenov/code-assembly-line GitHub Wiki

Add a new property by copying existing value.

Fields

   { 
      do      : 'copy'
    , data    : changes
    , select ?: items 
   }

Types

  • 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: { from : to }. 'From' is an existing key, 'to' is the new one.

Example

    { do: 'copy', data: {'text': 'alt'} }

Will create a new property 'alt', that will be like 'text'.