Function mergeWithoutOverwrite

  • Parameters

    • orders: {
          [key: string]: number;
      }[]

      an array of face-pair orders where

    Returns {
        [key: string]: number;
    }

    a single object merge of all input params

    • [key: string]: number

    Description

    Merge two or more objects into a single object, carefully checking if keys already exist, and if so, do the values match. If two similar keys have different values between objects, the method will throw an error.

    Throws

    an error is thrown if two objects contain the same key with different values.