/**
 * Sammlung einfacher Hilfsfunktionen, die man ab und an mal braucht.
 */ param value return { boolean } export function isNullOrUndefined ( value ) { return value === undefined || value === null ; } param value return { boolean } export function isString ( value ) { return typeof value === 'string' ; } param value return { boolean } export function isBoolean ( value ) { return typeof value === 'boolean' ; } param value return { boolean } export function isNumber ( value ) { return typeof value === 'number' ; } param value return { boolean } export function isArray ( value ) { return Array . isArray ( value ) ; } param value param index param self return { boolean } export function onlyUnique ( value , index , self ) { return self . indexOf ( value ) === index ; } param { string [ ] } list return { string } export function asCommaSeparatedList ( list ) { if ( isNullOrUndefined ( list ) ) { return '' ; } let result = '' ; for ( let i = 0 ; i < list . length ; i ++ ) { if ( i > 0 ) { result = result + ',' ; } result = result + list [ i ] ; } return result ; }