nl_tokens: Format array
pl_tokens: function formatArray ( formatter , value , encode , lengthRequirement ) { var output = value . slice ( ) ; // eslint-disable-line var formatObject = formatter ; // eslint-disable-line // if the formatter is an array or data, then make format object an array data if ( formatter === 'Array|DATA' ) { formatObject = [ 'D' ] ; } // if formatter is a FilterChange and acts like a BlockFilter // or PendingTx change format object to tx hash array if ( formatter === 'FilterChange' && typeof value [ 0 ] === 'string' ) { formatObject = [ 'D32' ] ; } // enforce minimum value length requirements if ( encode === true && typeof lengthRequirement === 'number' && value . length < lengthRequirement ) { throw new Error ( ` ${ JSON . stringify ( value ) } ${ lengthRequirement } ${ value . length } ` ) ; // eslint-disable-line } // make new array, avoid mutation formatObject = formatObject . slice ( ) ; // assume formatObject is an object, go through keys and format each value . forEach ( ( valueKey , valueIndex ) => { // use key zero as formatter for all values, unless otherwise specified var formatObjectKey = 0 ; // eslint-disable-line // if format array is exact, check each argument against formatter argument if ( formatObject . length > 1 ) { formatObjectKey = valueIndex ; } output [ valueIndex ] = format ( formatObject [ formatObjectKey ] , valueKey , encode ) ; } ) ; return <mask> ; }