nl_tokens: Public functions
pl_tokens: function ask ( questions ) { "use strict" ; let answers = { } ; let i = 0 ; return <mask> Promise ( function ( resolve , reject ) { function askQuestion ( item ) { let key = item . key ; let msg = item . msg ; let fn = fnList [ item . fn ] ; if ( ! key ) { throw new Error ( 'A value for `key` must be defined for question ' + i ) ; } if ( ! msg ) { throw new Error ( 'A value for `msg` must be defined for question ' + i ) ; } if ( ! fn ) { throw new Error ( 'A value for `fn` must be "prompt", "confirm", or "multiline" for question ' + i ) ; } if ( fn ) { fn ( msg , key , answers ) . then ( function ( ) { next ( ) ; } ) ; } } function next ( ) { if ( i < questions . length ) { var question = questions [ i ] ; i ++ ; askQuestion ( question ) ; } else { resolve ( answers ) ; } } next ( ) ; } ) ; }