import { SerializedFieldFormat } from '../../../../src/plugins/field_formats/common' ; import { FieldFormatsStart } from '../../../../src/plugins/field_formats/public' ; export const sampleSerializedFieldFormat = { id : 'bytes' , params : { pattern : '0.00b' , } , } ; export function getSample ( fieldFormats ) { const fieldFormat = fieldFormats . deserialize ( sampleSerializedFieldFormat ) ; const pairs = [ 1000 , 100000 , 100000000 ] . map ( ( value ) => ( { raw : value , formatted : fieldFormat . convert ( value ) , } ) ) ; return pairs ; }