(objs: any|any[])
| 88 | */ |
| 89 | // tslint:disable-next-line:no-any |
| 90 | export function objectListUid(objs: any|any[]): string { |
| 91 | const objectList = toList(objs); |
| 92 | let retVal = ''; |
| 93 | for (const obj of objectList) { |
| 94 | if (obj.id == null) { |
| 95 | throw new ValueError( |
| 96 | `Object ${obj} passed to objectListUid without an id`); |
| 97 | } |
| 98 | if (retVal !== '') { |
| 99 | retVal = retVal + ', '; |
| 100 | } |
| 101 | retVal = `${retVal}${Math.abs(obj.id)}`; |
| 102 | } |
| 103 | return retVal; |
| 104 | } |
| 105 | /** |
| 106 | * Converts string to snake-case. |
| 107 | * @param name |