import { Token } from './types' ; /**
 * Handles placeholder replacement with given params.
 */ export default class Params { private index = 0 ; param { Object } params constructor ( public params ) { this . params = params ; } param { Token } token param { string } token . key param { string } token . value return { string } get ( { key , value } ) { if ( ! this . params ) { return value ; } if ( key ) { return this . params [ key ] ; } return this . params [ this . index ++ ] ; } }