(objOrArr: any, method: string = 'combine')
| 4 | import {forIn} from './collection' |
| 5 | |
| 6 | export function unitObjectName(objOrArr: any, method: string = 'combine') { |
| 7 | let name = method + '(' |
| 8 | let comma = '' |
| 9 | let i = 0 |
| 10 | forIn(objOrArr, unit => { |
| 11 | /* inlined max object names constant */ |
| 12 | if (i < 25) { |
| 13 | if (unit != null) { |
| 14 | name += comma |
| 15 | name += is.unit(unit) |
| 16 | ? getCompositeName(unit as CommonUnit | Domain).fullName |
| 17 | : (unit as any).toString() |
| 18 | } |
| 19 | i += 1 |
| 20 | comma = ', ' |
| 21 | } |
| 22 | }) |
| 23 | return name + ')' |
| 24 | } |
| 25 | |
| 26 | export function setStoreName<State>(store: Store<State>, rawName: string) { |
| 27 | store.shortName = rawName |
no test coverage detected
searching dependent graphs…