nl_tokens: FUNCTIONS // FUNCTION : createTopic ( options ) Creates a new topic .
pl_tokens: function createTopic ( options ) { var max = Number . MAX_VALUE , duplicates = false ; if ( ! options . hasOwnProperty ( 'max' ) ) { options . max = max ; } else { max = options . max ; } if ( ! options . hasOwnProperty ( 'duplicates' ) ) { options . duplicates = duplicates ; } else { duplicates = options . duplicates ; } if ( ! isInteger ( max ) || <mask> < 0 ) { throw new TypeError ( 'createTopic()::invalid option. Max subscribers must be an integer greater than or equal to 0.' ) ; } if ( typeof duplicates !== 'boolean' ) { throw new TypeError ( 'createTopic()::invalid option. Duplicates flag must be a boolean.' ) ; } return { 'subscribers' : [ ] , 'options' : options } ; }