# all files / Github/bpmn-js/lib/util/model/ ModelCloneUtils.js

100% Statements 7/7
100% Branches 4/4
100% Functions 2/2
100% Lines 7/7

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36

    1×

    428×

    428×

    8760×
    168×

    8592×

    428×
     import {
      forEach
    } from 'min-dash';

    /**
     * These are the properties that should be ignored when cloning elements.
     *
     * @type {Array}
     */
    export var IGNORED_PROPERTIES = [
      'lanes',
      'incoming',
      'outgoing',
      'artifacts',
      'default',
      'flowElements',
      'dataInputAssociations',
      'dataOutputAssociations'
    ];

    export function getProperties(descriptor, keepDefault) {
      var properties = [];

      forEach(descriptor.properties, function(property) {

        if (keepDefault && property.default) {
          return;
        }

        properties.push(property.ns.name);
      });

      return properties;
    }